mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
Add phone call actions
This commit is contained in:
parent
a15a7dd6a8
commit
b7ec2a9b91
@ -576,4 +576,51 @@ class addressbook_hooks
|
||||
if (empty($config['geolocation_url'])) $ret ['geolocation_url'] = $geoLocation[0]['value'];
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get actions
|
||||
*
|
||||
* @return array return an array of actions
|
||||
*/
|
||||
public static function status_get_actions()
|
||||
{
|
||||
$config = Api\Config::read('stylite');
|
||||
|
||||
return [
|
||||
'addressbook_phonecall' => [
|
||||
'caption' => 'Phone Call',
|
||||
'icon' => 'call',
|
||||
'group' => 2,
|
||||
'enabled' => !empty($config['pbx_type']) && !empty($config['pbx_api_key']),
|
||||
'disableIfNoEPL' => !$GLOBALS['egw_info']['apps']['stylite'],
|
||||
'children' => [
|
||||
'addressbook_tel_work' => [
|
||||
'caption' => lang('Business phone'),
|
||||
'icon' => 'phone',
|
||||
'onExecute' => 'javaScript:app.status.phoneCall',
|
||||
'enabled' => 'javaScript:app.status.phoneIsAvailable'
|
||||
],
|
||||
'addressbook_tel_cell' => [
|
||||
'caption' => lang('Mobile phone'),
|
||||
'icon' => 'personal',
|
||||
'onExecute' => 'javaScript:app.status.phoneCall',
|
||||
'enabled' => 'javaScript:app.status.phoneIsAvailable'
|
||||
],
|
||||
'addressbook_tel_home' => [
|
||||
'caption' => lang('Home phone'),
|
||||
'icon' => 'home',
|
||||
'onExecute' => 'javaScript:app.status.phoneCall',
|
||||
'enabled' => 'javaScript:app.status.phoneIsAvailable'
|
||||
],
|
||||
'addressbook_tel_prefer' => [
|
||||
'caption' => lang('Favorite phone'),
|
||||
'icon' => 'fav_filter',
|
||||
'onExecute' => 'javaScript:app.status.phoneCall',
|
||||
'enabled' => 'javaScript:app.status.phoneIsAvailable'
|
||||
]
|
||||
]
|
||||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@ -1121,14 +1121,6 @@ var AddressbookApp = /** @class */ (function (_super) {
|
||||
}
|
||||
app.status.makeCall(data);
|
||||
};
|
||||
/**
|
||||
*
|
||||
* @param _action
|
||||
* @param _selected
|
||||
* @todo
|
||||
*/
|
||||
AddressbookApp.prototype.videoconference_scheduleCall = function (_action, _selected) {
|
||||
};
|
||||
return AddressbookApp;
|
||||
}(egw_app_1.EgwApp));
|
||||
app.classes.addressbook = AddressbookApp;
|
||||
|
@ -1363,17 +1363,6 @@ class AddressbookApp extends EgwApp
|
||||
app.status.makeCall(data);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param _action
|
||||
* @param _selected
|
||||
* @todo
|
||||
*/
|
||||
private videoconference_scheduleCall(_action, _selected)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.classes.addressbook = AddressbookApp;
|
||||
|
@ -47,6 +47,7 @@ $setup_info['addressbook']['hooks']['export_limit'] = 'addressbook_hooks::getApp
|
||||
$setup_info['addressbook']['hooks']['acl_rights'] = 'addressbook_hooks::acl_rights';
|
||||
$setup_info['addressbook']['hooks']['categories'] = 'addressbook_hooks::categories';
|
||||
$setup_info['addressbook']['hooks']['groupdav_root_props'] = 'addressbook_groupdav::groupdav_root_props';
|
||||
$setup_info['addressbook']['hooks']['status-get_actions'] = 'addressbook_hooks::status_get_actions';
|
||||
|
||||
/* Dependencies for this app to work */
|
||||
$setup_info['addressbook']['depends'][] = array(
|
||||
|
Loading…
Reference in New Issue
Block a user