Merge branch 'master' of github.com:roundcube/roundcubemail

pull/160/head
Aleksander Machniak 11 years ago
commit 81297785e1

@ -1,4 +1,5 @@
- Nicely handle server-side modification of script names (#1489412) - Nicely handle server-side modification of script names (#1489412)
- Add Filters tab/section using plugin API hook
* version 7.1 [2013-11-22] * version 7.1 [2013-11-22]
----------------------------------------------------------- -----------------------------------------------------------

@ -10,16 +10,6 @@ if (window.rcmail) {
else else
rcmail.enable_command('managesieve-create', true); 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')) { if (rcmail.env.task == 'mail' || rcmail.env.action.startsWith('plugin.managesieve')) {
// Create layer for form tips // Create layer for form tips

@ -45,6 +45,7 @@ class managesieve extends rcube_plugin
$this->register_action('plugin.managesieve-save', array($this, 'managesieve_save')); $this->register_action('plugin.managesieve-save', array($this, 'managesieve_save'));
if ($this->rc->task == 'settings') { if ($this->rc->task == 'settings') {
$this->add_hook('settings_actions', array($this, 'settings_actions'));
$this->init_ui(); $this->init_ui();
} }
else if ($this->rc->task == 'mail') { else if ($this->rc->task == 'mail') {
@ -74,6 +75,16 @@ class managesieve extends rcube_plugin
$this->ui_initialized = true; $this->ui_initialized = true;
} }
/**
* 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. * Add UI elements to the 'mailbox view' and 'show message' UI.
*/ */

Loading…
Cancel
Save