Replace "Filter disabled" with "Filter enabled" (#7028)

pull/7066/head
Aleksander Machniak 5 years ago
parent 8d81df7dc3
commit 45546508d2

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail 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) - 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 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) - Fix unread count after purge on a folder that is not currently selected (#7051)

@ -1,3 +1,5 @@
- Replace "Filter disabled" with "Filter enabled" (#7028)
* version 9.3 [2019-04-21] * version 9.3 [2019-04-21]
----------------------------------------------------------- -----------------------------------------------------------
- Use RFC-compliant line endings, CRLF instead of LF (#6686) - Use RFC-compliant line endings, CRLF instead of LF (#6686)

@ -698,7 +698,7 @@ class rcube_sieve_engine
$delheader_op = rcube_utils::get_input_value('_action_delheader_op', rcube_utils::INPUT_POST); $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); $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['join'] = $join == 'allof';
$this->form['name'] = $name; $this->form['name'] = $name;
$this->form['tests'] = array(); $this->form['tests'] = array();
@ -1508,7 +1508,7 @@ class rcube_sieve_engine
$_SESSION['managesieve-compact-form'] = $compact; $_SESSION['managesieve-compact-form'] = $compact;
// do not allow creation of new rules // 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'); $this->rc->output->show_message('managesieve.disabledaction', 'error');
return; return;
} }
@ -1556,12 +1556,13 @@ class rcube_sieve_engine
$this->filtersets_list(array('id' => 'sievescriptname'), true) $this->filtersets_list(array('id' => 'sievescriptname'), true)
); );
} }
else if ($compact) {
$out .= sprintf("\n" . '<div class="form-group row form-check">' $out .= sprintf("\n" . '<div class="form-group row form-check">'
. '<label for="disabled" class="col-sm-4 col-form-label">%s</label>' . '<label for="fenabled" class="col-sm-4 col-form-label">%s</label>'
. '<div class="col-sm-8 form-check"><input type="checkbox" id="disabled" name="_disabled" value="1" /></div></div>', . '<div class="col-sm-8 form-check">'
rcube::Q($this->plugin->gettext('filterdisabled'))); . '<input type="checkbox" id="fenabled" name="_enabled" value="1"' . (empty($scr['disabled']) ? ' checked' : '') . ' />'
} . '</div></div>',
rcube::Q($this->plugin->gettext('filterenabled')));
if ($compact) { if ($compact) {
$select = new html_select(array('name' => '_join', 'id' => '_join', $select = new html_select(array('name' => '_join', 'id' => '_join',

@ -91,6 +91,7 @@ $labels['none'] = 'none';
$labels['fromset'] = 'from set'; $labels['fromset'] = 'from set';
$labels['fromfile'] = 'from file'; $labels['fromfile'] = 'from file';
$labels['filterdisabled'] = 'Filter disabled'; $labels['filterdisabled'] = 'Filter disabled';
$labels['filterenabled'] = 'Filter enabled';
$labels['countisgreaterthan'] = 'count is greater than'; $labels['countisgreaterthan'] = 'count is greater than';
$labels['countisgreaterthanequal'] = 'count is greater than or equal to'; $labels['countisgreaterthanequal'] = 'count is greater than or equal to';
$labels['countislessthan'] = 'count is less than'; $labels['countislessthan'] = 'count is less than';

@ -104,9 +104,6 @@ if (window.rcmail) {
$('tr', rcmail.gui_objects.filtersetslist).each(function (i, e) { rcmail.managesieve_fixdragend(e); }); $('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 else
row.removeClass('disabled'); row.removeClass('disabled');
$('#disabled', $('iframe').contents()).prop('checked', o.disabled); $('#fenabled', $('iframe').contents()).prop('checked', !o.disabled);
break; break;

@ -1,5 +1,4 @@
#filtersetslistbox #filtersetslistbox {
{
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
@ -10,8 +9,7 @@
overflow: hidden; overflow: hidden;
} }
#filtersscreen #filtersscreen {
{
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
@ -19,13 +17,11 @@
left: 205px; left: 205px;
} }
#filtersscreen.nosetlist #filtersscreen.nosetlist {
{
left: 0; left: 0;
} }
#filterslistbox #filterslistbox {
{
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
@ -35,34 +31,29 @@
} }
#filterslist, #filterslist,
#filtersetslist #filtersetslist {
{
width: 100%; width: 100%;
table-layout: fixed; table-layout: fixed;
} }
#filterslist tbody td, #filterslist tbody td,
#filtersetslist tbody td #filtersetslist tbody td {
{
cursor: default; cursor: default;
text-overflow: ellipsis; text-overflow: ellipsis;
-o-text-overflow: ellipsis; -o-text-overflow: ellipsis;
} }
#filterslist tbody tr.disabled td, #filterslist tbody tr.disabled td,
#filtersetslist tbody tr.disabled td #filtersetslist tbody tr.disabled td {
{
color: #999999; color: #999999;
text-decoration: line-through; text-decoration: line-through;
} }
#filtersetslist tbody td #filtersetslist tbody td {
{
font-weight: bold; font-weight: bold;
} }
/* /*
#filtersetslist tr.selected #filtersetslist tr.selected {
{
background-color: #929292; background-color: #929292;
border-bottom: 1px solid #898989; border-bottom: 1px solid #898989;
color: #FFF; color: #FFF;
@ -70,20 +61,17 @@
} }
*/ */
#filterslist tbody tr.filtermoveup td #filterslist tbody tr.filtermoveup td {
{
border-top: 2px dotted #555; border-top: 2px dotted #555;
padding-top: 0px; padding-top: 0px;
} }
#filterslist tbody tr.filtermovedown td #filterslist tbody tr.filtermovedown td {
{
border-bottom: 2px dotted #555; border-bottom: 2px dotted #555;
padding-bottom: 1px; padding-bottom: 1px;
} }
#filter-box #filter-box {
{
position: absolute; position: absolute;
top: 0; top: 0;
right: 0; right: 0;
@ -92,37 +80,39 @@
overflow: hidden; overflow: hidden;
} }
#filter-frame #filter-frame {
{
border: none; border: none;
} }
body.iframe body.iframe {
{
min-width: 620px; min-width: 620px;
width: expression(Math.max(620, document.documentElement.clientWidth)+'px'); width: expression(Math.max(620, document.documentElement.clientWidth)+'px');
background-color: #F2F2F2; background-color: #F2F2F2;
} }
#filter-form #filter-form {
{
min-width: 550px; min-width: 550px;
width: expression(Math.max(550, document.documentElement.clientWidth)+'px'); width: expression(Math.max(550, document.documentElement.clientWidth)+'px');
white-space: nowrap; white-space: nowrap;
padding: 20px 10px 10px 10px; padding: 20px 10px 10px 10px;
} }
#filter-form legend, #filter-form label #filter-form legend,
{ #filter-form label {
color: #666666; color: #666666;
} }
filter-form .col-form-label { #filter-form .col-sm-4,
#filter-form .col-form-label {
display: inline-block; display: inline-block;
min-width: 75px; min-width: 100px;
line-height: 2.5; line-height: 2.5;
} }
#filter-form input[type=checkbox] {
margin: 0;
}
#filter-form .col-form-label + div { #filter-form .col-form-label + div {
display: inline; display: inline;
} }
@ -131,48 +121,45 @@ filter-form .col-form-label {
margin: 0; margin: 0;
} }
#rules, #actions #rules,
{ #actions {
margin-top: 5px; margin-top: 5px;
padding: 0; padding: 0;
border-collapse: collapse; border-collapse: collapse;
} }
div.rulerow, div.actionrow div.rulerow,
{ div.actionrow {
width: auto; width: auto;
padding: 2px; padding: 2px;
white-space: nowrap; white-space: nowrap;
border: 1px solid #F2F2F2; border: 1px solid #F2F2F2;
} }
div.rulerow:hover, div.actionrow:hover div.rulerow:hover,
{ div.actionrow:hover {
padding: 2px; padding: 2px;
white-space: nowrap; white-space: nowrap;
background: #F9F9F9; background: #F9F9F9;
border: 1px solid silver; border: 1px solid silver;
} }
div.rulerow table, div.actionrow table div.rulerow table,
{ div.actionrow table {
padding: 0px; padding: 0px;
min-width: 600px; min-width: 600px;
width: expression(Math.max(600, document.documentElement.clientWidth)+'px'); width: expression(Math.max(600, document.documentElement.clientWidth)+'px');
} }
td td {
{
vertical-align: top; vertical-align: top;
} }
td.advbutton td.advbutton {
{
width: 1%; width: 1%;
} }
td.advbutton a td.advbutton a {
{
display: block; display: block;
padding-top: 14px; padding-top: 14px;
height: 14px; height: 14px;
@ -184,136 +171,116 @@ td.advbutton a span {
display: none; display: none;
} }
td.advbutton a.show td.advbutton a.show {
{
background: url(images/down_small.gif) center no-repeat; 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; background: url(images/up_small.gif) center no-repeat;
} }
td.rowbuttons td.rowbuttons {
{
text-align: right; text-align: right;
white-space: nowrap; white-space: nowrap;
width: 1%; width: 1%;
} }
td.rowactions td.rowactions {
{
white-space: nowrap; white-space: nowrap;
width: 1%; width: 1%;
padding-top: 2px; padding-top: 2px;
} }
td.rowtargets td.rowtargets {
{
white-space: nowrap; white-space: nowrap;
width: 98%; width: 98%;
padding-left: 3px; padding-left: 3px;
padding-top: 2px; padding-top: 2px;
} }
td.rowtargets > div td.rowtargets > div {
{
vertical-align: top; vertical-align: top;
margin-top: 2px; margin-top: 2px;
} }
td.rowtargets div.adv td.rowtargets div.adv {
{
padding-top: 3px; padding-top: 3px;
} }
td.rowtargets div.adv span.label td.rowtargets div.adv span.label {
{
display: inline-block; display: inline-block;
padding-right: 10px; padding-right: 10px;
min-width: 65px; min-width: 65px;
} }
td.rowtargets div a td.rowtargets div a {
{
margin-left: 10px; margin-left: 10px;
} }
td.rowtargets div.adv input td.rowtargets div.adv input {
{
margin-bottom: 1px; margin-bottom: 1px;
} }
input.disabled, input.disabled:hover input.disabled,
{ input.disabled:hover {
color: #999999; color: #999999;
} }
input.error, textarea.error input.error,
{ textarea.error {
background-color: #FFFF88; background-color: #FFFF88;
} }
input.box, input.box,
input.radio input.radio {
{
border: 0; border: 0;
margin-top: 0; margin-top: 0;
} }
select.operator_selector select.operator_selector {
{
width: 200px; width: 200px;
vertical-align: top; vertical-align: top;
} }
td.rowtargets span, td.rowtargets span,
td.rowtargets label, td.rowtargets label,
span.label span.label {
{
color: #666666; color: #666666;
font-size: 10px; font-size: 10px;
white-space: nowrap; white-space: nowrap;
} }
td.rowtargets label td.rowtargets label {
{
color: black; color: black;
} }
#footer #footer {
{
padding-top: 5px; padding-top: 5px;
width: 100%; width: 100%;
} }
#footer .footerleft #footer .footerleft {
{
padding-left: 2px; padding-left: 2px;
white-space: nowrap; white-space: nowrap;
float: left; float: left;
} }
#footer .footerright #footer .footerright {
{
padding-right: 2px; padding-right: 2px;
white-space: nowrap; white-space: nowrap;
text-align: right; text-align: right;
float: right; float: right;
} }
.itemlist .itemlist {
{
line-height: 25px; line-height: 25px;
} }
.itemlist input .itemlist input {
{
vertical-align: middle; vertical-align: middle;
} }
span.sieve.error span.sieve.error {
{
color: red; color: red;
} }
@ -321,8 +288,7 @@ span.sieve.error
display: none; display: none;
} }
a.button.add a.button.add {
{
background: url(images/add.png) no-repeat; background: url(images/add.png) no-repeat;
width: 30px; width: 30px;
height: 20px; height: 20px;
@ -330,16 +296,14 @@ a.button.add
display: inline-block; display: inline-block;
} }
a.button.del a.button.del {
{
background: url(images/del.png) no-repeat; background: url(images/del.png) no-repeat;
width: 30px; width: 30px;
height: 20px; height: 20px;
display: inline-block; display: inline-block;
} }
a.button.disabled a.button.disabled {
{
opacity: 0.35; opacity: 0.35;
filter: alpha(opacity=35); filter: alpha(opacity=35);
cursor: default; cursor: default;
@ -347,15 +311,13 @@ a.button.disabled
#filter-form select, #filter-form select,
#filter-form input, #filter-form input,
#filter-form textarea #filter-form textarea {
{
font-size: 11px; font-size: 11px;
vertical-align: middle; vertical-align: middle;
} }
/* smart multi-row input field */ /* smart multi-row input field */
.listarea .listarea {
{
border: 1px solid #666; border: 1px solid #666;
margin: 0; margin: 0;
padding: 1px; padding: 1px;
@ -365,14 +327,12 @@ a.button.disabled
vertical-align: middle; vertical-align: middle;
} }
td.rowtargets > span.listarea td.rowtargets > span.listarea {
{
vertical-align: top; vertical-align: top;
margin-top: 2px; margin-top: 2px;
} }
.listelement .listelement {
{
display: block; display: block;
white-space: nowrap; white-space: nowrap;
background-color: #fff; background-color: #fff;
@ -384,18 +344,15 @@ td.rowtargets > span.listarea
line-height: 16px; line-height: 16px;
} }
.listarea.error .listelement .listarea.error .listelement {
{
background-color: #FFFF88; background-color: #FFFF88;
} }
.listelement:first-child .listelement:first-child {
{
border-top: none; border-top: none;
} }
#filter-form .listelement input #filter-form .listelement input {
{
border: none; border: none;
border-radius: 0; border-radius: 0;
box-shadow: none; box-shadow: none;
@ -408,13 +365,11 @@ td.rowtargets > span.listarea
background-color: transparent; background-color: transparent;
} }
.listelement input:focus .listelement input:focus {
{
box-shadow: none; box-shadow: none;
} }
.listelement .reset .listelement .reset {
{
display: inline-block; display: inline-block;
width: 16px; width: 16px;
height: 16px; height: 16px;
@ -425,14 +380,12 @@ td.rowtargets > span.listarea
/* fixes for popup window */ /* fixes for popup window */
body.iframe.mail body.iframe.mail {
{
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
body.iframe.mail #filter-form body.iframe.mail #filter-form {
{
padding: 10px 5px 5px 5px; padding: 10px 5px 5px 5px;
} }

@ -51,12 +51,10 @@
font-weight: bold; font-weight: bold;
} }
#managesieve-tip #managesieve-tip {
{
z-index: 100000; z-index: 100000;
} }
span.sieve.error span.sieve.error {
{
color: red; color: red;
} }

@ -17,10 +17,6 @@
<div class="footerleft"> <div class="footerleft">
<roundcube:button command="plugin.managesieve-save" type="input" class="button mainaction" label="save" /> <roundcube:button command="plugin.managesieve-save" type="input" class="button mainaction" label="save" />
</div> </div>
<div class="footerright">
<label for="disabled"><roundcube:label name="managesieve.filterdisabled" /></label>
<input type="checkbox" id="disabled" name="_disabled" value="1" />
</div>
</div> </div>
<roundcube:endif /> <roundcube:endif />

@ -95,8 +95,8 @@ body.iframe
padding: 20px 10px 10px 10px; padding: 20px 10px 10px 10px;
} }
#filter-form legend, #filter-form label #filter-form legend,
{ #filter-form label {
color: #666666; color: #666666;
vertical-align: middle; vertical-align: middle;
} }
@ -105,12 +105,17 @@ body.iframe
border: none; border: none;
} }
#filter-form .col-sm-4,
#filter-form .col-form-label { #filter-form .col-form-label {
display: inline-block; display: inline-block;
min-width: 75px; min-width: 100px;
line-height: 2.5; line-height: 2.5;
} }
#filter-form input[type=checkbox] {
margin: 0;
}
#filter-form .col-form-label + div { #filter-form .col-form-label + div {
display: inline; display: inline;
} }
@ -352,6 +357,7 @@ span.sieve.error
vertical-align: middle; vertical-align: middle;
max-width: 280px; max-width: 280px;
} }
/* revert larry style button */ /* revert larry style button */
#filter-form input.button #filter-form input.button
{ {

@ -16,10 +16,6 @@
<div id="footer"> <div id="footer">
<div class="footerleft formbuttons"> <div class="footerleft formbuttons">
<roundcube:button command="plugin.managesieve-save" type="input" class="button mainaction" label="save" /> <roundcube:button command="plugin.managesieve-save" type="input" class="button mainaction" label="save" />
<label for="disabled">
<input type="checkbox" id="disabled" name="_disabled" value="1" />
<roundcube:label name="managesieve.filterdisabled" />
</label>
</div> </div>
</div> </div>
<roundcube:endif /> <roundcube:endif />

Loading…
Cancel
Save