mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-20 21:50:49 +01:00
Include lettersearch when forcing preferences
This commit is contained in:
parent
06608e852c
commit
b68d7f7274
@ -1056,19 +1056,25 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
|||||||
{
|
{
|
||||||
$GLOBALS['egw']->preferences->delete($app,$pref_name,'forced');
|
$GLOBALS['egw']->preferences->delete($app,$pref_name,'forced');
|
||||||
$GLOBALS['egw']->preferences->delete($app,$refresh_pref_name,'forced');
|
$GLOBALS['egw']->preferences->delete($app,$refresh_pref_name,'forced');
|
||||||
|
$GLOBALS['egw']->preferences->delete($app,$pref_name.'-size','forced');
|
||||||
|
$GLOBALS['egw']->preferences->delete($app,$pref_name.'-lettersearch','forced');
|
||||||
$GLOBALS['egw']->preferences->save_repository(true,'forced');
|
$GLOBALS['egw']->preferences->save_repository(true,'forced');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set columns + refresh as default for all users
|
// Set columns + refresh as default for all users
|
||||||
// Columns included in submit, preference might not be updated yet
|
// Columns included in submit, preference might not be updated yet
|
||||||
$cols = $value['selectcols'];
|
$cols = $value['selectcols'];
|
||||||
$GLOBALS['egw']->preferences->read();
|
$GLOBALS['egw']->preferences->read_repository(true);
|
||||||
$GLOBALS['egw']->preferences->add($app,$pref_name,is_array($cols) ? implode(',',$cols) : $cols, $pref_level);
|
$GLOBALS['egw']->preferences->add($app,$pref_name,is_array($cols) ? implode(',',$cols) : $cols, $pref_level);
|
||||||
|
|
||||||
// Autorefresh
|
// Autorefresh
|
||||||
$refresh = $value['nm_autorefresh'];
|
$refresh = $value['nm_autorefresh'];
|
||||||
$GLOBALS['egw']->preferences->add($app,$refresh_pref_name,(int)$refresh,$pref_level);
|
$GLOBALS['egw']->preferences->add($app,$refresh_pref_name,(int)$refresh,$pref_level);
|
||||||
|
|
||||||
|
// Lettersearch
|
||||||
|
$lettersearch = is_array($cols) && in_array('lettersearch', $cols);
|
||||||
|
$GLOBALS['egw']->preferences->add($app,$pref_name.'-lettersearch',(int)$lettersearch,$pref_level);
|
||||||
|
|
||||||
$GLOBALS['egw']->preferences->save_repository(true,$pref_level);
|
$GLOBALS['egw']->preferences->save_repository(true,$pref_level);
|
||||||
$GLOBALS['egw']->preferences->read(true);
|
$GLOBALS['egw']->preferences->read(true);
|
||||||
|
|
||||||
@ -1077,6 +1083,7 @@ class etemplate_widget_nextmatch extends etemplate_widget
|
|||||||
// Clear column + refresh preference so users go back to default
|
// Clear column + refresh preference so users go back to default
|
||||||
$GLOBALS['egw']->preferences->delete_preference($app,$pref_name);
|
$GLOBALS['egw']->preferences->delete_preference($app,$pref_name);
|
||||||
$GLOBALS['egw']->preferences->delete_preference($app,$pref_name.'-size');
|
$GLOBALS['egw']->preferences->delete_preference($app,$pref_name.'-size');
|
||||||
|
$GLOBALS['egw']->preferences->delete_preference($app,$pref_name.'-lettersearch');
|
||||||
$GLOBALS['egw']->preferences->delete_preference($app,$refresh_pref_name);
|
$GLOBALS['egw']->preferences->delete_preference($app,$refresh_pref_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1379,6 +1379,10 @@ var et2_nextmatch = et2_DOMWidget.extend([et2_IResizeable, et2_IInput, et2_IPrin
|
|||||||
// Set default or clear forced?
|
// Set default or clear forced?
|
||||||
if(defaultCheck.get_value())
|
if(defaultCheck.get_value())
|
||||||
{
|
{
|
||||||
|
if(show_letters)
|
||||||
|
{
|
||||||
|
self.activeFilters.selectcols.push('lettersearch');
|
||||||
|
}
|
||||||
self.getInstanceManager().submit();
|
self.getInstanceManager().submit();
|
||||||
}
|
}
|
||||||
self.selectPopup = null;
|
self.selectPopup = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user