Permalink
Browse files

Show name and state of currently selected ruleset when multiple rules…

…ets enabled
  • Loading branch information...
1 parent 3f28137 commit a645de0f45e3aac0f7ff7c2d009e8eba229e20df @JohnDoh committed Nov 24, 2012
View
@@ -1,7 +1,8 @@
Roundcube Webmail SieveRules
============================
- * automatically activate first ruleset even when multi rulesets enabled
+ * show name and state of currently selected ruleset when multiple rulesets enabled
+ * automatically activate first ruleset even when multiple rulesets enabled
* add option to use "friendly" names in :from params
* rename default skin to classic (c40419bdfe)
* rcube_ui > rcube_utils (r6091)
View
@@ -3,6 +3,7 @@
$labels = array();
$labels['filters'] = 'Filters';
+$labels['filtersname'] = 'Filters ($name)';
$labels['managefilters'] = 'Manage message filters';
$labels['filtername'] = 'Filter name';
$labels['disablerule'] = 'Disable rule';
@@ -117,6 +118,8 @@ $labels['i;ascii-numeric'] = 'numeric match';
$labels['selectruleset'] = 'Select ruleset';
$labels['activeruleset'] = '%s (active)';
$labels['activateruleset'] = 'Activate this ruleset';
+$labels['isactive'] = 'Active ruleset';
+$labels['isinactive'] = 'Inactive ruleset';
$labels['newruleset'] = 'Create a new ruleset';
$labels['delruleset'] = 'Delete this ruleset';
$labels['renameruleset'] = 'Rename this ruleset';
View
@@ -3,6 +3,7 @@
$labels = array();
$labels['filters'] = 'Filters';
+$labels['filtersname'] = 'Filters ($name)';
$labels['managefilters'] = 'Manage message filters';
$labels['filtername'] = 'Filter name';
$labels['disablerule'] = 'Disable rule';
@@ -117,6 +118,8 @@ $labels['i;ascii-numeric'] = 'numeric match';
$labels['selectruleset'] = 'Select ruleset';
$labels['activeruleset'] = '%s (active)';
$labels['activateruleset'] = 'Activate this ruleset';
+$labels['isactive'] = 'Active ruleset';
+$labels['isinactive'] = 'Inactive ruleset';
$labels['newruleset'] = 'Create a new ruleset';
$labels['delruleset'] = 'Delete this ruleset';
$labels['renameruleset'] = 'Rename this ruleset';
View
@@ -13,8 +13,8 @@
<email>roundcube@tehinterweb.co.uk</email>
<active>yes</active>
</lead>
- <date>2012-07-30</date>
- <time>11:41:13</time>
+ <date>2012-11-24</date>
+ <time>11:43:25</time>
<version>
<release>1.18</release>
<api>1.18</api>
@@ -67,6 +67,7 @@
<file name="localization/sl_SI.inc" role="data"/>
<file name="localization/sv_SE.inc" role="data"/>
<file name="localization/zh_TW.inc" role="data"/>
+ <file name="skins/classic/cross.gif" role="data"/>
<file name="skins/classic/help.gif" role="data"/>
<file name="skins/classic/icons.gif" role="data"/>
<file name="skins/classic/icons.png" role="data"/>
@@ -79,6 +80,8 @@
<file name="skins/classic/templates/editsieverule.html" role="data"/>
<file name="skins/classic/templates/setupsieverules.html" role="data"/>
<file name="skins/classic/templates/sieverules.html" role="data"/>
+ <file name="skins/classic/tick.gif" role="data"/>
+ <file name="skins/larry/cross.png" role="data"/>
<file name="skins/larry/help.png" role="data"/>
<file name="skins/larry/icons.png" role="data"/>
<file name="skins/larry/iehacks.css" role="data"/>
@@ -90,6 +93,7 @@
<file name="skins/larry/templates/editsieverule.html" role="data"/>
<file name="skins/larry/templates/setupsieverules.html" role="data"/>
<file name="skins/larry/templates/sieverules.html" role="data"/>
+ <file name="skins/larry/tick.png" role="data"/>
</dir>
<!-- / -->
</contents>
View
@@ -223,7 +223,18 @@ function gen_list($attrib)
$this->api->output->add_gui_object('sieverules_list', 'sieverules-table');
$table = new html_table(array('id' => 'sieverules-table', 'class' => 'records-table', 'cellspacing' => '0', 'cols' => 2));
- $table->add_header(array('colspan' => 2), $this->gettext('filters'));
+
+ if (rcube::get_instance()->config->get('sieverules_multiplerules', false)) {
+ if ($this->current_ruleset == $this->sieve->get_active())
+ $status = html::img(array('id' => 'rulesetstatus', 'src' => $attrib['activeicon'], 'alt' => $this->gettext('isactive'), 'title' => $this->gettext('isactive')));
+ else
+ $status = html::img(array('id' => 'rulesetstatus', 'src' => $attrib['inactiveicon'], 'alt' => $this->gettext('isinactive'), 'title' => $this->gettext('isinactive')));
+
+ $table->add_header(array('colspan' => '2'), html::span(array('title' => $this->current_ruleset), $this->gettext(array('name' => 'filtersname', 'vars' => array('name' => $this->current_ruleset)))) . $status);
+ }
+ else {
+ $table->add_header(array('colspan' => 2), $this->gettext('filters'));
+ }
if (sizeof($this->script) == 0) {
$table->add(array('colspan' => '2'), rcube_utils::rep_specialchars_output($this->gettext('nosieverules')));
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -30,6 +30,31 @@
overflow: auto;
}
+#sieverules-list-filters thead td
+{
+ height: 20px;
+}
+
+#sieverules-list-filters thead td span
+{
+ position: absolute;
+ top: 2px;
+ left: 4px;
+ right: 25px;
+ height: 20px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+
+#sieverules-list-filters thead td img
+{
+ position: absolute;
+ top: 2px;
+ right: 2px;
+}
+
#sieverules-list-examples
{
position: absolute;
@@ -45,7 +45,7 @@
<div id="sieverules-list">
<div class="sieverules-boxcontent">
-<roundcube:object name="sieveruleslist" />
+<roundcube:object name="sieveruleslist" activeicon="/this/tick.gif" inactiveicon="/this/cross.gif" />
<roundcube:object name="sieverulesexamplelist" />
</div>
<div class="boxfooter">
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
@@ -22,6 +22,29 @@
overflow: auto;
}
+#sieverules-list-filters thead td
+{
+ height: 15px;
+}
+
+#sieverules-list-filters thead td span
+{
+ position: absolute;
+ top: 10px;
+ left: 8px;
+ right: 30px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+
+#sieverules-list-filters thead td img
+{
+ position: absolute;
+ top: 9px;
+ right: 8px;
+}
+
#sieverules-list-examples
{
position: absolute;
@@ -23,7 +23,7 @@
<div id="sieverules-list" class="uibox listbox">
<div class="scroller withfooter">
-<roundcube:object name="sieveruleslist" class="listing" cellspacing="0" noheader="true" />
+<roundcube:object name="sieveruleslist" class="listing" cellspacing="0" noheader="true" activeicon="/this/tick.png" inactiveicon="/this/cross.png" />
<roundcube:object name="sieverulesexamplelist" class="listing" cellspacing="0" noheader="true" />
</div>
<div class="boxfooter">
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a645de0

Please sign in to comment.