forked from extern/egroupware
Change CRM view preference to also affect default list action (double click), added 'Edit' option
This commit is contained in:
parent
0c220389fb
commit
e64f6979af
@ -207,11 +207,12 @@ class addressbook_hooks
|
||||
'default'=> 'org_name: n_family, n_given',
|
||||
);
|
||||
$crm_list_options = array(
|
||||
'infolog' => lang('infolog')
|
||||
'~edit~' => lang('Edit contact'),
|
||||
'infolog' => lang('Open %1 CRM view', lang('infolog')),
|
||||
);
|
||||
if($GLOBALS['egw_info']['user']['apps']['tracker'])
|
||||
{
|
||||
$crm_list_options['tracker'] = lang('tracker');
|
||||
$crm_list_options['tracker'] = lang('Open %1 CRM view', lang('tracker'));
|
||||
}
|
||||
$settings['crm_list'] = array(
|
||||
'type' => 'select',
|
||||
|
@ -352,7 +352,7 @@ class addressbook_ui extends addressbook_bo
|
||||
$actions = array(
|
||||
'view' => array(
|
||||
'caption' => 'CRM-View',
|
||||
'default' => true,
|
||||
'default' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['crm_list'] != '~edit~',
|
||||
'allowOnMultiple' => false,
|
||||
'group' => $group=1,
|
||||
'onExecute' => 'javaScript:app.addressbook.view',
|
||||
@ -361,6 +361,7 @@ class addressbook_ui extends addressbook_bo
|
||||
),
|
||||
'open' => array(
|
||||
'caption' => 'Open',
|
||||
'default' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['crm_list'] == '~edit~',
|
||||
'allowOnMultiple' => false,
|
||||
'url' => 'menuaction=addressbook.addressbook_ui.edit&contact_id=$id',
|
||||
'popup' => egw_link::get_registry('addressbook', 'add_popup'),
|
||||
@ -2283,6 +2284,7 @@ window.egw_LAB.wait(function() {
|
||||
// CRM list comes from content, request, or preference
|
||||
$crm_list = $content['crm_list'] ? $content['crm_list'] :
|
||||
($_GET['crm_list'] ? $_GET['crm_list'] : $GLOBALS['egw_info']['user']['preferences']['addressbook']['crm_list']);
|
||||
if(!$crm_list) $crm_list = 'infolog';
|
||||
|
||||
if(is_array($content))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user