From a0a1326e6f8f19c666275374930260ebaa218de0 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 7 May 2019 11:17:26 +0200 Subject: [PATCH] Add mail compose action for status app --- mail/inc/class.mail_hooks.inc.php | 16 ++++++++++++++++ mail/setup/setup.inc.php | 1 + 2 files changed, 17 insertions(+) diff --git a/mail/inc/class.mail_hooks.inc.php b/mail/inc/class.mail_hooks.inc.php index 421f7d9de6..9509251fab 100644 --- a/mail/inc/class.mail_hooks.inc.php +++ b/mail/inc/class.mail_hooks.inc.php @@ -693,4 +693,20 @@ class mail_hooks } return true; } + + /** + * Add mail related actions into status action + * + * @return array returns array of actions + */ + public static function get_status_actions () + { + return [ + 'mail' => [ + 'caption' => 'Mail', + 'allowOnMultiple' => false, + 'onExecute' => 'javaScript:app.status.handle_actions', + ] + ]; + } } diff --git a/mail/setup/setup.inc.php b/mail/setup/setup.inc.php index ac93a09a1c..00011d10b9 100644 --- a/mail/setup/setup.inc.php +++ b/mail/setup/setup.inc.php @@ -36,6 +36,7 @@ $setup_info['mail']['hooks']['verify_settings'] = 'EGroupware\\Api\\Mail::forceP $setup_info['mail']['hooks']['clear_cache'] = 'EGroupware\\Api\\Mail::unsetCachedObjects'; $setup_info['mail']['hooks']['check_notify'] = 'mail_hooks::notification_check_mailbox'; $setup_info['mail']['hooks']['emailadmin_edit'] = 'mail_hooks::emailadmin_edit'; +$setup_info['mail']['hooks']['status-get_actions'] = 'mail_hooks::get_status_actions'; /* Dependencies for this app to work */ $setup_info['mail']['depends'][] = array(