From 880a923bd8e7b385b2be8f5efeaeb0dddf7767fa Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Fri, 18 Sep 2015 13:40:52 +0000 Subject: [PATCH] Add some new actions into mail preview and display toolbars --- mail/inc/class.mail_ui.inc.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/mail/inc/class.mail_ui.inc.php b/mail/inc/class.mail_ui.inc.php index 93c95d75b4..f26ce64340 100644 --- a/mail/inc/class.mail_ui.inc.php +++ b/mail/inc/class.mail_ui.inc.php @@ -1464,7 +1464,7 @@ class mail_ui { $actions = $this->get_actions(); $arrActions = array('composeasnew', 'reply', 'reply_all', 'forward', 'flagged', 'delete', 'print', - 'infolog', 'tracker', 'calendar', 'save', 'view', 'read'); + 'infolog', 'tracker', 'calendar', 'save', 'view', 'read', 'label1', 'label2', 'label3', 'label4', 'label5'); foreach( $arrActions as &$act) { //error_log(__METHOD__.__LINE__.' '.$act.'->'.array2string($actions[$act])); @@ -1486,6 +1486,26 @@ class mail_ui case 'read': $actionsenabled[$act]= $actions['mark']['children'][$act]; break; + case 'label1': + $actions['mark']['children']['setLabel']['children'][$act]['caption'] = lang('important'); + $actionsenabled[$act]= $actions['mark']['children']['setLabel']['children'][$act]; + break; + case 'label2': + $actions['mark']['children']['setLabel']['children'][$act]['caption'] = lang('job'); + $actionsenabled[$act]= $actions['mark']['children']['setLabel']['children'][$act]; + break; + case 'label3': + $actions['mark']['children']['setLabel']['children'][$act]['caption'] = lang('personal'); + $actionsenabled[$act]= $actions['mark']['children']['setLabel']['children'][$act]; + break; + case 'label4': + $actions['mark']['children']['setLabel']['children'][$act]['caption'] = lang('to do'); + $actionsenabled[$act]= $actions['mark']['children']['setLabel']['children'][$act]; + break; + case 'label5': + $actions['mark']['children']['setLabel']['children'][$act]['caption'] = lang('later'); + $actionsenabled[$act]= $actions['mark']['children']['setLabel']['children'][$act]; + break; default: if (isset($actions[$act])) $actionsenabled[$act]=$actions[$act]; }