diff --git a/dev/External/ko.js b/dev/External/ko.js index 4d29b99b5..976bb253d 100644 --- a/dev/External/ko.js +++ b/dev/External/ko.js @@ -90,7 +90,6 @@ ko.bindingHandlers.command = { throw new Error('Value should be a command'); } - element.classList.add('command'); ko.bindingHandlers['FORM'==element.nodeName ? 'submit' : 'click'].init( element, fValueAccessor, @@ -105,10 +104,8 @@ ko.bindingHandlers.command = { let disabled = !command.enabled(); - cl.toggle('no-disabled', !disabled); - disabled = disabled || !command.canExecute(); - ['disable','disabled'].forEach(s => cl.toggle(s, disabled)); + cl.toggle('disabled', disabled); if (element.matches('INPUT,TEXTAREA,BUTTON')) { element.disabled = disabled; diff --git a/dev/Knoin/Knoin.js b/dev/Knoin/Knoin.js index 266a0f2df..11a883e71 100644 --- a/dev/Knoin/Knoin.js +++ b/dev/Knoin/Knoin.js @@ -323,12 +323,7 @@ export function startScreens(screensClasses) { function decorateKoCommands(thisArg, commands) { Object.entries(commands).forEach(([key, canExecute]) => { let command = thisArg[key], - fn = function(...args) { - if (fn.enabled() && fn.canExecute()) { - command.apply(thisArg, args); - } - return false; - }; + fn = (...args) => fn.enabled() && fn.canExecute() && command.apply(thisArg, args); // fn.__realCanExecute = canExecute; // fn.isCommand = true; @@ -337,7 +332,7 @@ function decorateKoCommands(thisArg, commands) { fn.canExecute = (typeof canExecute === 'function') ? ko.computed(() => fn.enabled() && canExecute.call(thisArg, thisArg)) - : ko.computed(() => fn.enabled() && !!canExecute); + : ko.computed(() => fn.enabled()); thisArg[key] = fn; }); diff --git a/dev/Styles/AdminDomain.less b/dev/Styles/AdminDomain.less index a93c1ef9e..79ec859dc 100644 --- a/dev/Styles/AdminDomain.less +++ b/dev/Styles/AdminDomain.less @@ -18,15 +18,10 @@ position: relative; overflow: hidden; width: 1600px; - height: 400px; left: 0; transition: left 500ms ease; } - &.domain-edit .modal-body { - height: 340px; - } - &.domain-second-page .modal-body { left: -800px; } diff --git a/dev/Styles/Contacts.less b/dev/Styles/Contacts.less index 3fd3b1811..4f1c3cd13 100644 --- a/dev/Styles/Contacts.less +++ b/dev/Styles/Contacts.less @@ -20,7 +20,9 @@ top: 0; bottom: 0; left: 0; - width: 900px; + width: auto; + min-width: 550px; + max-width: 900px; min-height: 300px; max-height: 700px; @@ -184,7 +186,7 @@ box-shadow: inset 0 -1px 0 #ccc; .button-save-contact { - &.no-disabled.dirty { + &.dirty:enabled { color: #51a351; font-weight: bold; } @@ -201,8 +203,7 @@ bottom: 60px; left: @contacts-popup-left-width; right: 0; - overflow: hidden; - overflow-y: auto; + overflow: auto; background-color: #fff; border-left: 1px solid #ddd; diff --git a/dev/Styles/Layout.less b/dev/Styles/Layout.less index ec79d1fb2..c00c8da65 100644 --- a/dev/Styles/Layout.less +++ b/dev/Styles/Layout.less @@ -204,10 +204,6 @@ html:not(.rl-left-panel-disabled) #rl-left.resizable > .resizer, #rl-sub-right { left: 500px; } - - .b-contacts-content.modal { - width: 900px; - } } /* desktop */ @@ -227,10 +223,6 @@ html:not(.rl-left-panel-disabled) #rl-left.resizable > .resizer, #rl-sub-right { left: 400px; } - - .b-contacts-content.modal { - width: 900px; - } } /* mobile and tablet */ @@ -250,29 +242,10 @@ html:not(.rl-left-panel-disabled) #rl-left.resizable > .resizer, #rl-sub-right { left: 310px; } - - .b-contacts-content.modal { - width: 700px; - } - - .b-contacts-content.modal { - .contactValueInput { - width: 200px; - } - } } /* tablet */ @media screen and (min-width: 768px) and (max-width: 999px) { - .b-contacts-content.modal { - width: 800px; - } - - .b-contacts-content.modal { - .contactValueInput { - width: 250px; - } - } } .hidden-on-ctrl-btn, diff --git a/dev/Styles/OpenPgpKey.less b/dev/Styles/OpenPgpKey.less index ff3e4ae22..a66266003 100644 --- a/dev/Styles/OpenPgpKey.less +++ b/dev/Styles/OpenPgpKey.less @@ -1,9 +1,11 @@ #rl-popups { - .b-open-pgp-key-view-content, .b-open-pgp-key-generate-content, .b-open-pgp-key-add-content, .b-compose-open-pgp-content, .b-message-open-pgp-content { - + .b-open-pgp-key-view-content, .b-open-pgp-key-generate-content { &.modal { width: 570px; } + } + + .b-open-pgp-key-view-content, .b-open-pgp-key-generate-content, .b-open-pgp-key-add-content, .b-compose-open-pgp-content, .b-message-open-pgp-content { .inputKey { font-family: var(--fontMono);