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
===========================
- 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)

@ -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)

@ -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" . '<div class="form-group row form-check">'
. '<label for="disabled" 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>',
rcube::Q($this->plugin->gettext('filterdisabled')));
}
$out .= sprintf("\n" . '<div class="form-group row form-check">'
. '<label for="fenabled" class="col-sm-4 col-form-label">%s</label>'
. '<div class="col-sm-8 form-check">'
. '<input type="checkbox" id="fenabled" name="_enabled" value="1"' . (empty($scr['disabled']) ? ' checked' : '') . ' />'
. '</div></div>',
rcube::Q($this->plugin->gettext('filterenabled')));
if ($compact) {
$select = new html_select(array('name' => '_join', 'id' => '_join',

@ -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';

@ -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;

@ -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;
}

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

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

@ -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
{

@ -16,10 +16,6 @@
<div id="footer">
<div class="footerleft formbuttons">
<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>
<roundcube:endif />

Loading…
Cancel
Save