mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
* Infolog/Edit:Add an implicit user preference in order to remember the last chosen of infolog's type
This commit is contained in:
parent
d5cb4112b5
commit
eeb375de39
@ -63,7 +63,7 @@ class infolog_hooks
|
||||
),
|
||||
'add' => array(
|
||||
'menuaction' => 'infolog.infolog_ui.edit',
|
||||
'type' => 'task'
|
||||
'type' => $GLOBALS['egw_info']['user']['preferences']['preferred_type']
|
||||
),
|
||||
'add_app' => 'action',
|
||||
'add_id' => 'action_id',
|
||||
|
@ -1699,6 +1699,8 @@ class infolog_ui
|
||||
}
|
||||
else
|
||||
{
|
||||
$GLOBALS['egw']->preferences->add('infolog','preferred_type',$content['info_type']);
|
||||
$GLOBALS['egw']->preferences->save_repository(false,'user',false);
|
||||
$content['msg'] = lang('InfoLog entry saved');
|
||||
egw_framework::refresh_opener($content['msg'],'infolog',$info_id,$operation);
|
||||
}
|
||||
@ -1953,6 +1955,10 @@ class infolog_ui
|
||||
{
|
||||
$content['info_type'] = $type;
|
||||
}
|
||||
else if ($type == '' && empty($content['info_type']) && isset($GLOBALS['egw_info']['user']['preferences']['infolog']['preferred_type']))
|
||||
{
|
||||
$content['info_type'] = $GLOBALS['egw_info']['user']['preferences']['infolog']['preferred_type'];
|
||||
}
|
||||
if (empty($content['info_status'])) $content['info_status'] = $this->bo->status['defaults'][$content['info_type']];
|
||||
if (empty($content['info_percent'])) $content['info_percent'] = $content['info_status'] == 'done' ? '100%' : '0%';
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user