mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Handle context action view infolog entries in JS, previously opened infolog list into addressbook tab
This commit is contained in:
parent
4b789c932d
commit
5a1fe439c5
@ -516,6 +516,8 @@ class addressbook_ui extends addressbook_bo
|
||||
'infolog' => array(
|
||||
'caption' => lang('View linked InfoLog entries'),
|
||||
'icon' => 'infolog/navbar',
|
||||
'onExecute' => 'javaScript:app.addressbook.view_infolog',
|
||||
'allowOnMultiple' => false
|
||||
),
|
||||
'infolog_add' => array(
|
||||
'caption' => 'Add a new Infolog',
|
||||
@ -895,16 +897,6 @@ window.egw_LAB.wait(function() {
|
||||
$Ok = false;
|
||||
break;
|
||||
|
||||
case 'infolog':
|
||||
egw::redirect_link('/index.php',array(
|
||||
'menuaction' => 'infolog.infolog_ui.index',
|
||||
'action' => 'addressbook',
|
||||
'action_id' => implode(',',$checked),
|
||||
'action_title' => count($checked) > 1 ? lang('selected contacts') : '',
|
||||
'ajax' => 'true'
|
||||
));
|
||||
break;
|
||||
|
||||
case 'merge':
|
||||
$success = $this->merge($checked,$error_msg);
|
||||
$failed = count($checked) - (int)$success;
|
||||
|
@ -109,6 +109,25 @@ app.classes.addressbook = AppJS.extend(
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* View infolog entries linked to selected contact - just one, infolog fails with multiple
|
||||
* @param {egwAction} _action Select action
|
||||
* @param {egwActionObject[]} _senders Selected contact(s)
|
||||
*/
|
||||
view_infolog: function(_action, _senders)
|
||||
{
|
||||
var extras = {
|
||||
action: 'addressbook',
|
||||
action_id: [],
|
||||
action_title: _senders.length > 1 ? this.egw.lang('selected contacts') : ''
|
||||
}
|
||||
// Remove UID prefix for just contact_id
|
||||
var id = _senders[0].id.split('::');
|
||||
extras.action_id = id[1];
|
||||
|
||||
egw.open('', 'infolog', 'list', extras, 'infolog');
|
||||
},
|
||||
|
||||
/**
|
||||
* Add task for selected contacts, call default nm_action after some checks
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user