diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 2e49d3740c..ebe9720f75 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -349,6 +349,13 @@ class mail_ui 'caption' => 'Mail filter', 'icon' => 'configure', 'onExecute' => 'javaScript:app.mail.edit_sieve', + 'group' => $group++, + ), + 'vacation' => array( + 'caption' => 'Vacation notice', + 'icon' => 'configure', + 'onExecute' => 'javaScript:app.mail.edit_vacation', + 'group' => $group++, ), 'edit_account' => array( 'caption' => 'Edit account', @@ -366,7 +373,11 @@ 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']); + if (!$this->mail_bo->icServer->acc_sieve_enabled) + { + unset($tree_actions['sieve']); + unset($tree_actions['vacation']); + } $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'; diff --git a/mail/js/app.js b/mail/js/app.js index d39953febf..2be24569de 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -2184,7 +2184,7 @@ app.classes.mail = AppJS.extend( } }, - sieve_egw_refresh: function(_execid,_msg) + sieve_refresh: function(_execid,_msg) { var request = egw().json('mail.mail_sieve.ajax_sieve_egw_refresh', [this.et2_obj.etemplate_exec_id,_msg],null,this.et2_obj,true); console.log(request); @@ -2252,6 +2252,16 @@ app.classes.mail = AppJS.extend( { this.egw.open_link('mail.mail_sieve.index'); }, + + /** + * + * @todo get the account id and open the relevant vacation, ATM alway open vacation rules which is set in preferences + */ + edit_vacation: function() + { + this.egw.open_link('mail.mail_sieve.editVacation','_blank','700x480'); + }, + /** * Edit a folder acl for account(s) *