mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
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',
|
'default'=> 'org_name: n_family, n_given',
|
||||||
);
|
);
|
||||||
$crm_list_options = array(
|
$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'])
|
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(
|
$settings['crm_list'] = array(
|
||||||
'type' => 'select',
|
'type' => 'select',
|
||||||
|
@ -352,7 +352,7 @@ class addressbook_ui extends addressbook_bo
|
|||||||
$actions = array(
|
$actions = array(
|
||||||
'view' => array(
|
'view' => array(
|
||||||
'caption' => 'CRM-View',
|
'caption' => 'CRM-View',
|
||||||
'default' => true,
|
'default' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['crm_list'] != '~edit~',
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
'group' => $group=1,
|
'group' => $group=1,
|
||||||
'onExecute' => 'javaScript:app.addressbook.view',
|
'onExecute' => 'javaScript:app.addressbook.view',
|
||||||
@ -361,6 +361,7 @@ class addressbook_ui extends addressbook_bo
|
|||||||
),
|
),
|
||||||
'open' => array(
|
'open' => array(
|
||||||
'caption' => 'Open',
|
'caption' => 'Open',
|
||||||
|
'default' => $GLOBALS['egw_info']['user']['preferences']['addressbook']['crm_list'] == '~edit~',
|
||||||
'allowOnMultiple' => false,
|
'allowOnMultiple' => false,
|
||||||
'url' => 'menuaction=addressbook.addressbook_ui.edit&contact_id=$id',
|
'url' => 'menuaction=addressbook.addressbook_ui.edit&contact_id=$id',
|
||||||
'popup' => egw_link::get_registry('addressbook', 'add_popup'),
|
'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 comes from content, request, or preference
|
||||||
$crm_list = $content['crm_list'] ? $content['crm_list'] :
|
$crm_list = $content['crm_list'] ? $content['crm_list'] :
|
||||||
($_GET['crm_list'] ? $_GET['crm_list'] : $GLOBALS['egw_info']['user']['preferences']['addressbook']['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))
|
if(is_array($content))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user