From 527694f361d5faab4739c5ab1bda7586f67a5211 Mon Sep 17 00:00:00 2001 From: djmaze Date: Mon, 12 Oct 2020 15:03:45 +0200 Subject: [PATCH] Replace bootstrap .divider with cleaner .dividerbar which also reduces knockout calls --- dev/Common/Utils.js | 30 ++++--------------- dev/Styles/_BootstrapFix.less | 16 ++++++---- .../templates/Views/User/MailMessageList.html | 17 ++++------- .../templates/Views/User/MailMessageView.html | 10 ++----- .../templates/Views/User/PopupsCompose.html | 3 +- .../templates/Views/User/PopupsContacts.html | 9 ++---- .../templates/Views/User/SystemDropDown.html | 8 ++--- vendors/bootstrap/less/dropdowns.less | 5 ---- vendors/bootstrap/less/mixins.less | 11 ------- vendors/bootstrap/less/navs.less | 4 --- 10 files changed, 30 insertions(+), 83 deletions(-) diff --git a/dev/Common/Utils.js b/dev/Common/Utils.js index 4f49b938c..4fd3da1a5 100644 --- a/dev/Common/Utils.js +++ b/dev/Common/Utils.js @@ -369,7 +369,7 @@ export function folderListOptionsBuilder( id: line[0], name: line[1], system: false, - seporator: false, + dividerbar: false, disabled: false }); }); @@ -377,27 +377,17 @@ export function folderListOptionsBuilder( bSep = true; aSystem.forEach(oItem => { if (fVisibleCallback ? fVisibleCallback(oItem) : true) { - if (bSep && aResult.length) { - aResult.push({ - id: '---', - name: '---', - system: false, - seporator: true, - disabled: true - }); - } - - bSep = false; aResult.push({ id: oItem.fullNameRaw, name: fRenameCallback ? fRenameCallback(oItem) : oItem.name(), system: true, - seporator: false, + dividerbar: bSep, disabled: !oItem.selectable || aDisabled.includes(oItem.fullNameRaw) || (fDisableCallback ? fDisableCallback(oItem) : false) }); + bSep = false; } }); @@ -410,29 +400,19 @@ export function folderListOptionsBuilder( ) { if (fVisibleCallback ? fVisibleCallback(oItem) : true) { if (FolderType.User === oItem.type() || !bSystem || oItem.hasSubScribedSubfolders()) { - if (bSep && aResult.length) { - aResult.push({ - id: '---', - name: '---', - system: false, - seporator: true, - disabled: true - }); - } - - bSep = false; aResult.push({ id: oItem.fullNameRaw, name: new Array(oItem.deep + 1 - iUnDeep).join(sDeepPrefix) + (fRenameCallback ? fRenameCallback(oItem) : oItem.name()), system: false, - seporator: false, + dividerbar: bSep, disabled: !oItem.selectable || aDisabled.includes(oItem.fullNameRaw) || (fDisableCallback ? fDisableCallback(oItem) : false) }); + bSep = false; } } } diff --git a/dev/Styles/_BootstrapFix.less b/dev/Styles/_BootstrapFix.less index 9264e8e25..e6a1d72f8 100644 --- a/dev/Styles/_BootstrapFix.less +++ b/dev/Styles/_BootstrapFix.less @@ -133,10 +133,6 @@ select { font-size: 17px; } -.dropdown-menu { - border-radius: @btnBorderRadius; -} - .btn-group + .btn-group { margin-left: 3px; } @@ -190,8 +186,16 @@ select { } .dropdown-menu { - border-radius: 0; - box-shadow: 0 1px 2px rgba(0,0,0,0.2); + border-radius: 0; + box-shadow: 0 1px 2px rgba(0,0,0,0.2); +} +.dropdown-menu * + .dividerbar { + margin-top: 9px; + padding-top: 9px; + border-top: 1px solid #e5e5e5; +/* + border-image: linear-gradient(to right, #00F 10%, #FFF 10%, #FFF 19%, #F00 19%, #F00 28%, #FFF 28%, #FFF 37%, #00F 37%, #00F 46%, #FFF 46%, #FFF 55%, #F00 55%, #F00 64%, #FFF 64%, #FFF 73%, #00F 73%, #00F 82%, #FFF 82%, #FFF 91%, #F00 91%) 1; +*/ } .btn-group > .btn { diff --git a/rainloop/v/0.0.0/app/templates/Views/User/MailMessageList.html b/rainloop/v/0.0.0/app/templates/Views/User/MailMessageList.html index 2c5e2da49..a090045b6 100644 --- a/rainloop/v/0.0.0/app/templates/Views/User/MailMessageList.html +++ b/rainloop/v/0.0.0/app/templates/Views/User/MailMessageList.html @@ -36,14 +36,9 @@ @@ -120,16 +115,14 @@ - - - - -
- + -
- +
- - -
  • -
  • +
  •    diff --git a/rainloop/v/0.0.0/app/templates/Views/User/PopupsContacts.html b/rainloop/v/0.0.0/app/templates/Views/User/PopupsContacts.html index ed9dd7fc3..91af31019 100644 --- a/rainloop/v/0.0.0/app/templates/Views/User/PopupsContacts.html +++ b/rainloop/v/0.0.0/app/templates/Views/User/PopupsContacts.html @@ -38,8 +38,7 @@
  • - - - - - - - - - -