summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2014-01-05 10:34:18 +0100
committerAleksander Machniak <alec@alec.pl>2014-01-05 10:34:18 +0100
commit81297785e1e0cd0cfb5bbee2e44a3e6da3c363dd (patch)
treea2f9d9260c1ed6ae7597af567348a5e70bc5a888 /plugins
parentb23b3f2c35f6f1c1b534f88d4b517ff49e7ae002 (diff)
parent7e0d2d9d13ff862597b689bc8cd3195dc065bf9b (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'plugins')
-rw-r--r--plugins/managesieve/Changelog1
-rw-r--r--plugins/managesieve/managesieve.js10
-rw-r--r--plugins/managesieve/managesieve.php11
3 files changed, 12 insertions, 10 deletions
diff --git a/plugins/managesieve/Changelog b/plugins/managesieve/Changelog
index a5a231b9a..825bef6fd 100644
--- a/plugins/managesieve/Changelog
+++ b/plugins/managesieve/Changelog
@@ -1,4 +1,5 @@
- Nicely handle server-side modification of script names (#1489412)
+- Add Filters tab/section using plugin API hook
* version 7.1 [2013-11-22]
-----------------------------------------------------------
diff --git a/plugins/managesieve/managesieve.js b/plugins/managesieve/managesieve.js
index 4e810b1ae..15637026e 100644
--- a/plugins/managesieve/managesieve.js
+++ b/plugins/managesieve/managesieve.js
@@ -10,16 +10,6 @@ if (window.rcmail) {
else
rcmail.enable_command('managesieve-create', true);
}
- else {
- var tab = $('<span>').attr('id', 'settingstabpluginmanagesieve').addClass('tablink filter'),
- button = $('<a>').attr('href', rcmail.env.comm_path+'&_action=plugin.managesieve')
- .attr('title', rcmail.gettext('managesieve.managefilters'))
- .html(rcmail.gettext('managesieve.filters'))
- .appendTo(tab);
-
- // add tab
- rcmail.add_element(tab, 'tabs');
- }
if (rcmail.env.task == 'mail' || rcmail.env.action.startsWith('plugin.managesieve')) {
// Create layer for form tips
diff --git a/plugins/managesieve/managesieve.php b/plugins/managesieve/managesieve.php
index 46c4e2e5b..7a7faee4c 100644
--- a/plugins/managesieve/managesieve.php
+++ b/plugins/managesieve/managesieve.php
@@ -45,6 +45,7 @@ class managesieve extends rcube_plugin
$this->register_action('plugin.managesieve-save', array($this, 'managesieve_save'));
if ($this->rc->task == 'settings') {
+ $this->add_hook('settings_actions', array($this, 'settings_actions'));
$this->init_ui();
}
else if ($this->rc->task == 'mail') {
@@ -75,6 +76,16 @@ class managesieve extends rcube_plugin
}
/**
+ * Adds Filters section in Settings
+ */
+ function settings_actions($args)
+ {
+ // register as settings action
+ $args['actions'][] = array('action' => 'plugin.managesieve', 'class' => 'filter', 'label' => 'filters', 'domain' => 'managesieve');
+ return $args;
+ }
+
+ /**
* Add UI elements to the 'mailbox view' and 'show message' UI.
*/
function mail_task_handler()