New action for adding contact from addressbook accounts list into roster list

This commit is contained in:
Hadi Nategh 2018-08-08 16:06:17 +02:00
parent 7289e80e92
commit 8f99f175aa

View File

@ -597,7 +597,32 @@ class addressbook_ui extends addressbook_bo
'hideOnDisabled' => true 'hideOnDisabled' => true
); );
++$group; // integration with other apps: infolog, calendar, filemanager ++$group; // integration with other apps: infolog, calendar, filemanager, messenger
// Integrate Messenger app actions for adding new buddy into roster list
if ($GLOBALS['egw_info']['user']['apps']['messenger'])
{
$actions['messenger_app'] = array(
'caption' => 'Messenger',
'icon' => 'messenger/navbar',
'group' => $group,
'children' => array(
'addBuddy' => array(
'caption' => lang('Add contact'),
'icon' => 'add',
'allowOnMultiple' => true,
'onExecute' => 'javaScript:app.messenger.addBuddy',
'enabled' => 'javaScript:app.messenger.addBuddyEnabaled'
)
)
);
}
$actions = array_merge($actions, Api\Hooks::process (array(
'location' => 'addressbook_actions',
'actions' => $actions
), '', true));
if ($GLOBALS['egw_info']['user']['apps']['infolog']) if ($GLOBALS['egw_info']['user']['apps']['infolog'])
{ {
$actions['infolog_app'] = array( $actions['infolog_app'] = array(