mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
Store infolog list details/no details choice as implicit preference
This commit is contained in:
parent
d50ccc9c21
commit
a862bd46bb
@ -893,7 +893,6 @@ class infolog_ui
|
||||
'no_describtion' => 'no details',
|
||||
'all' => 'details',
|
||||
);
|
||||
if(!isset($values['nm']['filter2'])) $values['nm']['filter2'] = $this->prefs['show_links'];
|
||||
|
||||
//apply infolog_filter_change javascript method (hide/show of date filter form) over onchange filter
|
||||
$values['nm']['filter_onchange'] = "app.infolog.filter_change();";
|
||||
@ -915,6 +914,8 @@ class infolog_ui
|
||||
// Allow add actions even when there's no rows
|
||||
$values['nm']['placeholder_actions'] = array('new');
|
||||
|
||||
if(!isset($values['nm']['filter2'])) $values['nm']['filter2'] = $this->prefs['nextmatch-'.($action ? 'infolog.'.$action : 'infolog.index.rows').'-details-pref'];
|
||||
|
||||
// disable columns for main entry as set in the pref for details or no details
|
||||
$values['nm']['columnselection_pref'] = 'nextmatch-'.($action ? 'infolog.'.$action : 'infolog.index.rows')
|
||||
.($values['nm']['filter2']=='all' ? '-details' : '');
|
||||
|
@ -163,6 +163,9 @@ app.classes.infolog = AppJS.extend(
|
||||
// Show / hide descriptions
|
||||
this.show_details(filter2.value == 'all', nm.getDOMNode(nm));
|
||||
|
||||
// Store selection as implicit preference
|
||||
egw.set_preference('infolog', nm.options.settings.columnselection_pref.replace('-details','')+'-details-pref', filter2.value);
|
||||
|
||||
// Change preference location - widget is nextmatch
|
||||
nm.options.settings.columnselection_pref = nm.options.settings.columnselection_pref.replace('-details','') + (filter2.value == 'all' ? '-details' :'');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user