mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 06:30:59 +01:00
Implement reset user preferences for admin toolbar actions
This commit is contained in:
parent
3c85c5ce9c
commit
698e77e0cb
@ -713,7 +713,7 @@ var et2_toolbar = (function(){ "use strict"; return et2_DOMWidget.extend([et2_II
|
||||
];
|
||||
var self = this;
|
||||
var sel_options = {actions:[]};
|
||||
var content = {actions:[]};
|
||||
var content = {actions:[], reset:false};
|
||||
for (var key in _actions)
|
||||
{
|
||||
if (_actions[key]['children'] && this.flat_list)
|
||||
|
@ -81,6 +81,9 @@ class Toolbar extends Etemplate\Widget
|
||||
$GLOBALS['egw']->preferences->save_repository(true, 'default');
|
||||
$GLOBALS['egw']->preferences->read(true);
|
||||
break;
|
||||
case 'reset':
|
||||
if ($setting) $GLOBALS['egw']->preferences->change_preference($app, $id,'', null, 'user');
|
||||
break;
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
@ -13,6 +13,10 @@
|
||||
<description value="default visible actions" label="%s:"/>
|
||||
<taglist id="actions" editModeEnabled="false" allowFreeEntries="false" autocomplete_url=' ' class="et2_fullWidth"/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="reset all to default" label="%s:"/>
|
||||
<checkbox id="reset" statustext="This will reset toolbar preferences for all users and set them to configured default prefs."/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
|
Loading…
Reference in New Issue
Block a user