Add sieve link to mail tree action menu

This commit is contained in:
Hadi Nategh 2013-12-17 15:21:36 +00:00
parent e10865c133
commit eef0abc590
2 changed files with 19 additions and 4 deletions

View File

@ -345,6 +345,11 @@ class mail_ui
'caption' => 'Delete Folder',
'onExecute' => 'javaScript:app.mail.mail_DeleteFolder'
),
'sieve' => array(
'caption' => 'Mail filter',
'icon' => 'configure',
'onExecute' => 'javaScript:app.mail.edit_sieve',
),
'edit_account' => array(
'caption' => 'Edit account',
'icon' => 'configure',
@ -361,6 +366,9 @@ class mail_ui
if (!$this->mail_bo->icServer->queryCapability('ACL')) unset($tree_actions['edit_acl']);
$etpl->setElementAttribute(self::$nm_index.'[foldertree]','actions', $tree_actions);
if (!$this->mail_bo->icServer->acc_sieve_enabled) unset($tree_actions['sieve']);
$etpl->setElementAttribute(self::$nm_index.'[foldertree]','actions', $tree_actions);
if (empty($content[self::$nm_index]['filter2']) || empty($content[self::$nm_index]['search'])) $content[self::$nm_index]['filter2']='quick';
$readonlys = $preserv = $sel_options;
$endtime = microtime(true) - $starttime;

View File

@ -2244,7 +2244,14 @@ app.classes.mail = AppJS.extend(
aclCommonWidget.set_value(rights);
}
},
/**
*
* @todo get the account id and open the relevant sieve, ATM alway open sieve rules which is set in preferences
*/
edit_sieve: function()
{
this.egw.open_link('mail.mail_sieve.index');
},
/**
* Edit a folder acl for account(s)
*