diff --git a/CHANGELOG b/CHANGELOG index d970c1795..788e4ba03 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Managesieve: Replace "Filter disabled" with "Filter enabled" (#7028) - Enigma: Add script to import keys from filesystem to the db storage (for multihost) - Fix so type attribute on script tags is not used on HTML5 pages (#6975) - Fix unread count after purge on a folder that is not currently selected (#7051) diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog index f74e4f350..ead1e742a 100644 --- a/plugins/managesieve/Changelog +++ b/plugins/managesieve/Changelog @@ -1,3 +1,5 @@ +- Replace "Filter disabled" with "Filter enabled" (#7028) + * version 9.3 [2019-04-21] ----------------------------------------------------------- - Use RFC-compliant line endings, CRLF instead of LF (#6686) diff --git a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php index 7c74d6988..b62e7565f 100644 --- a/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php +++ b/plugins/managesieve/lib/Roundcube/rcube_sieve_engine.php @@ -698,7 +698,7 @@ class rcube_sieve_engine $delheader_op = rcube_utils::get_input_value('_action_delheader_op', rcube_utils::INPUT_POST); $delheader_comp = rcube_utils::get_input_value('_action_delheader_comp', rcube_utils::INPUT_POST); - $this->form['disabled'] = !empty($_POST['_disabled']); + $this->form['disabled'] = empty($_POST['_enabled']); $this->form['join'] = $join == 'allof'; $this->form['name'] = $name; $this->form['tests'] = array(); @@ -1508,7 +1508,7 @@ class rcube_sieve_engine $_SESSION['managesieve-compact-form'] = $compact; // do not allow creation of new rules - if ($fid == null && in_array('new_rule', $this->disabled_actions)) { + if ($fid === null && in_array('new_rule', $this->disabled_actions)) { $this->rc->output->show_message('managesieve.disabledaction', 'error'); return; } @@ -1556,12 +1556,13 @@ class rcube_sieve_engine $this->filtersets_list(array('id' => 'sievescriptname'), true) ); } - else if ($compact) { - $out .= sprintf("\n" . '
' - . '' - . '
', - rcube::Q($this->plugin->gettext('filterdisabled'))); - } + + $out .= sprintf("\n" . '
' + . '' + . '
' + . '' + . '
', + rcube::Q($this->plugin->gettext('filterenabled'))); if ($compact) { $select = new html_select(array('name' => '_join', 'id' => '_join', diff --git a/plugins/managesieve/localization/en_US.inc b/plugins/managesieve/localization/en_US.inc index 0ab602ce5..a5c6d2702 100644 --- a/plugins/managesieve/localization/en_US.inc +++ b/plugins/managesieve/localization/en_US.inc @@ -91,6 +91,7 @@ $labels['none'] = 'none'; $labels['fromset'] = 'from set'; $labels['fromfile'] = 'from file'; $labels['filterdisabled'] = 'Filter disabled'; +$labels['filterenabled'] = 'Filter enabled'; $labels['countisgreaterthan'] = 'count is greater than'; $labels['countisgreaterthanequal'] = 'count is greater than or equal to'; $labels['countislessthan'] = 'count is less than'; diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js index bf8cd39dc..4ced267e2 100644 --- a/plugins/managesieve/managesieve.js +++ b/plugins/managesieve/managesieve.js @@ -104,9 +104,6 @@ if (window.rcmail) { $('tr', rcmail.gui_objects.filtersetslist).each(function (i, e) { rcmail.managesieve_fixdragend(e); }); } } - - if (rcmail.gui_objects.sieveform && rcmail.env.rule_disabled) - $('#disabled').attr('checked', true); }); }; @@ -295,7 +292,7 @@ rcube_webmail.prototype.managesieve_updatelist = function(action, o) else row.removeClass('disabled'); - $('#disabled', $('iframe').contents()).prop('checked', o.disabled); + $('#fenabled', $('iframe').contents()).prop('checked', !o.disabled); break; diff --git a/plugins/managesieve/skins/classic/managesieve.css b/plugins/managesieve/skins/classic/managesieve.css index fdf80f683..3aab9e651 100644 --- a/plugins/managesieve/skins/classic/managesieve.css +++ b/plugins/managesieve/skins/classic/managesieve.css @@ -1,5 +1,4 @@ -#filtersetslistbox -{ +#filtersetslistbox { position: absolute; top: 0; bottom: 0; @@ -10,8 +9,7 @@ overflow: hidden; } -#filtersscreen -{ +#filtersscreen { position: absolute; top: 0; right: 0; @@ -19,13 +17,11 @@ left: 205px; } -#filtersscreen.nosetlist -{ +#filtersscreen.nosetlist { left: 0; } -#filterslistbox -{ +#filterslistbox { position: absolute; left: 0; top: 0; @@ -35,34 +31,29 @@ } #filterslist, -#filtersetslist -{ +#filtersetslist { width: 100%; table-layout: fixed; } #filterslist tbody td, -#filtersetslist tbody td -{ +#filtersetslist tbody td { cursor: default; text-overflow: ellipsis; -o-text-overflow: ellipsis; } #filterslist tbody tr.disabled td, -#filtersetslist tbody tr.disabled td -{ +#filtersetslist tbody tr.disabled td { color: #999999; - text-decoration: line-through; + text-decoration: line-through; } -#filtersetslist tbody td -{ +#filtersetslist tbody td { font-weight: bold; } /* -#filtersetslist tr.selected -{ +#filtersetslist tr.selected { background-color: #929292; border-bottom: 1px solid #898989; color: #FFF; @@ -70,20 +61,17 @@ } */ -#filterslist tbody tr.filtermoveup td -{ +#filterslist tbody tr.filtermoveup td { border-top: 2px dotted #555; padding-top: 0px; } -#filterslist tbody tr.filtermovedown td -{ +#filterslist tbody tr.filtermovedown td { border-bottom: 2px dotted #555; padding-bottom: 1px; } -#filter-box -{ +#filter-box { position: absolute; top: 0; right: 0; @@ -92,37 +80,39 @@ overflow: hidden; } -#filter-frame -{ +#filter-frame { border: none; } -body.iframe -{ +body.iframe { min-width: 620px; width: expression(Math.max(620, document.documentElement.clientWidth)+'px'); background-color: #F2F2F2; } -#filter-form -{ +#filter-form { min-width: 550px; width: expression(Math.max(550, document.documentElement.clientWidth)+'px'); white-space: nowrap; padding: 20px 10px 10px 10px; } -#filter-form legend, #filter-form label -{ +#filter-form legend, +#filter-form label { color: #666666; } -filter-form .col-form-label { +#filter-form .col-sm-4, +#filter-form .col-form-label { display: inline-block; - min-width: 75px; + min-width: 100px; line-height: 2.5; } +#filter-form input[type=checkbox] { + margin: 0; +} + #filter-form .col-form-label + div { display: inline; } @@ -131,48 +121,45 @@ filter-form .col-form-label { margin: 0; } -#rules, #actions -{ +#rules, +#actions { margin-top: 5px; padding: 0; border-collapse: collapse; } -div.rulerow, div.actionrow -{ +div.rulerow, +div.actionrow { width: auto; padding: 2px; white-space: nowrap; border: 1px solid #F2F2F2; } -div.rulerow:hover, div.actionrow:hover -{ +div.rulerow:hover, +div.actionrow:hover { padding: 2px; white-space: nowrap; background: #F9F9F9; border: 1px solid silver; } -div.rulerow table, div.actionrow table -{ +div.rulerow table, +div.actionrow table { padding: 0px; min-width: 600px; width: expression(Math.max(600, document.documentElement.clientWidth)+'px'); } -td -{ +td { vertical-align: top; } -td.advbutton -{ +td.advbutton { width: 1%; } -td.advbutton a -{ +td.advbutton a { display: block; padding-top: 14px; height: 14px; @@ -184,136 +171,116 @@ td.advbutton a span { display: none; } -td.advbutton a.show -{ +td.advbutton a.show { background: url(images/down_small.gif) center no-repeat; } -td.advbutton a.hide -{ +td.advbutton a.hide { background: url(images/up_small.gif) center no-repeat; } -td.rowbuttons -{ +td.rowbuttons { text-align: right; white-space: nowrap; width: 1%; } -td.rowactions -{ +td.rowactions { white-space: nowrap; width: 1%; padding-top: 2px; } -td.rowtargets -{ +td.rowtargets { white-space: nowrap; width: 98%; padding-left: 3px; padding-top: 2px; } -td.rowtargets > div -{ +td.rowtargets > div { vertical-align: top; margin-top: 2px; } -td.rowtargets div.adv -{ +td.rowtargets div.adv { padding-top: 3px; } -td.rowtargets div.adv span.label -{ +td.rowtargets div.adv span.label { display: inline-block; padding-right: 10px; min-width: 65px; } -td.rowtargets div a -{ +td.rowtargets div a { margin-left: 10px; } -td.rowtargets div.adv input -{ +td.rowtargets div.adv input { margin-bottom: 1px; } -input.disabled, input.disabled:hover -{ +input.disabled, +input.disabled:hover { color: #999999; } -input.error, textarea.error -{ +input.error, +textarea.error { background-color: #FFFF88; } input.box, -input.radio -{ +input.radio { border: 0; margin-top: 0; } -select.operator_selector -{ +select.operator_selector { width: 200px; vertical-align: top; } td.rowtargets span, td.rowtargets label, -span.label -{ +span.label { color: #666666; font-size: 10px; white-space: nowrap; } -td.rowtargets label -{ +td.rowtargets label { color: black; } -#footer -{ +#footer { padding-top: 5px; width: 100%; } -#footer .footerleft -{ +#footer .footerleft { padding-left: 2px; white-space: nowrap; float: left; } -#footer .footerright -{ +#footer .footerright { padding-right: 2px; white-space: nowrap; text-align: right; float: right; } -.itemlist -{ +.itemlist { line-height: 25px; } -.itemlist input -{ +.itemlist input { vertical-align: middle; } -span.sieve.error -{ +span.sieve.error { color: red; } @@ -321,8 +288,7 @@ span.sieve.error display: none; } -a.button.add -{ +a.button.add { background: url(images/add.png) no-repeat; width: 30px; height: 20px; @@ -330,16 +296,14 @@ a.button.add display: inline-block; } -a.button.del -{ +a.button.del { background: url(images/del.png) no-repeat; width: 30px; height: 20px; display: inline-block; } -a.button.disabled -{ +a.button.disabled { opacity: 0.35; filter: alpha(opacity=35); cursor: default; @@ -347,15 +311,13 @@ a.button.disabled #filter-form select, #filter-form input, -#filter-form textarea -{ +#filter-form textarea { font-size: 11px; vertical-align: middle; } /* smart multi-row input field */ -.listarea -{ +.listarea { border: 1px solid #666; margin: 0; padding: 1px; @@ -365,14 +327,12 @@ a.button.disabled vertical-align: middle; } -td.rowtargets > span.listarea -{ +td.rowtargets > span.listarea { vertical-align: top; margin-top: 2px; } -.listelement -{ +.listelement { display: block; white-space: nowrap; background-color: #fff; @@ -384,18 +344,15 @@ td.rowtargets > span.listarea line-height: 16px; } -.listarea.error .listelement -{ +.listarea.error .listelement { background-color: #FFFF88; } -.listelement:first-child -{ +.listelement:first-child { border-top: none; } -#filter-form .listelement input -{ +#filter-form .listelement input { border: none; border-radius: 0; box-shadow: none; @@ -408,13 +365,11 @@ td.rowtargets > span.listarea background-color: transparent; } -.listelement input:focus -{ +.listelement input:focus { box-shadow: none; } -.listelement .reset -{ +.listelement .reset { display: inline-block; width: 16px; height: 16px; @@ -425,14 +380,12 @@ td.rowtargets > span.listarea /* fixes for popup window */ -body.iframe.mail -{ +body.iframe.mail { margin: 0; padding: 0; } -body.iframe.mail #filter-form -{ +body.iframe.mail #filter-form { padding: 10px 5px 5px 5px; } diff --git a/plugins/managesieve/skins/classic/managesieve_mail.css b/plugins/managesieve/skins/classic/managesieve_mail.css index 1ade4f790..773e4d55c 100644 --- a/plugins/managesieve/skins/classic/managesieve_mail.css +++ b/plugins/managesieve/skins/classic/managesieve_mail.css @@ -51,12 +51,10 @@ font-weight: bold; } -#managesieve-tip -{ +#managesieve-tip { z-index: 100000; } -span.sieve.error -{ +span.sieve.error { color: red; } diff --git a/plugins/managesieve/skins/classic/templates/filteredit.html b/plugins/managesieve/skins/classic/templates/filteredit.html index 27481bae6..b2b4528d5 100644 --- a/plugins/managesieve/skins/classic/templates/filteredit.html +++ b/plugins/managesieve/skins/classic/templates/filteredit.html @@ -17,10 +17,6 @@
-
- - -
diff --git a/plugins/managesieve/skins/larry/managesieve.css b/plugins/managesieve/skins/larry/managesieve.css index a4d46672d..51156586f 100644 --- a/plugins/managesieve/skins/larry/managesieve.css +++ b/plugins/managesieve/skins/larry/managesieve.css @@ -95,8 +95,8 @@ body.iframe padding: 20px 10px 10px 10px; } -#filter-form legend, #filter-form label -{ +#filter-form legend, +#filter-form label { color: #666666; vertical-align: middle; } @@ -105,12 +105,17 @@ body.iframe border: none; } +#filter-form .col-sm-4, #filter-form .col-form-label { display: inline-block; - min-width: 75px; + min-width: 100px; line-height: 2.5; } +#filter-form input[type=checkbox] { + margin: 0; +} + #filter-form .col-form-label + div { display: inline; } @@ -352,6 +357,7 @@ span.sieve.error vertical-align: middle; max-width: 280px; } + /* revert larry style button */ #filter-form input.button { diff --git a/plugins/managesieve/skins/larry/templates/filteredit.html b/plugins/managesieve/skins/larry/templates/filteredit.html index 689384aa8..f2aaaaed4 100644 --- a/plugins/managesieve/skins/larry/templates/filteredit.html +++ b/plugins/managesieve/skins/larry/templates/filteredit.html @@ -16,10 +16,6 @@