From 1464c6d77765b4d829c176f95ae3d66d3d54389b Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Fri, 6 Oct 2017 14:09:56 +0200 Subject: [PATCH] Various improvements --- skins/elastic/styles/widgets/buttons.less | 3 +++ skins/elastic/styles/widgets/forms.less | 11 +++++++++++ skins/elastic/ui.js | 7 +------ 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/skins/elastic/styles/widgets/buttons.less b/skins/elastic/styles/widgets/buttons.less index 755143089..fb1d37f98 100644 --- a/skins/elastic/styles/widgets/buttons.less +++ b/skins/elastic/styles/widgets/buttons.less @@ -91,6 +91,9 @@ button.btn { &.remove:before { content: @fa-var-close; } + &.unlock:before { + content: @fa-var-unlock; + } } button.btn { diff --git a/skins/elastic/styles/widgets/forms.less b/skins/elastic/styles/widgets/forms.less index 967f43890..aec7270f2 100644 --- a/skins/elastic/styles/widgets/forms.less +++ b/skins/elastic/styles/widgets/forms.less @@ -29,6 +29,17 @@ input.smart-upload { &:not(.popupmenu) { width: 100%; } + + /* This is the way we can have multiple checkboxes in a single form field */ + .form-check td:not(.title) > label { + display: block; + margin: 0; + line-height: 2rem; + + label { + margin-right: .5rem; + } + } } .propform, diff --git a/skins/elastic/ui.js b/skins/elastic/ui.js index fae35eb25..3d5e3f0aa 100644 --- a/skins/elastic/ui.js +++ b/skins/elastic/ui.js @@ -202,12 +202,7 @@ function rcube_elastic_ui() .appendTo(rcmail.gui_objects.messageform); $(this).on('change', function() { - if (this.type == 'checkbox') { - hidden.attr('checked', $(this).attr('checked')); - } - else { - hidden.val($(this).val()); - } + hidden.val(this.type != 'checkbox' || this.checked ? $(this).val() : ''); }).change(); });