mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-18 11:58:24 +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 self = this;
|
||||||
var sel_options = {actions:[]};
|
var sel_options = {actions:[]};
|
||||||
var content = {actions:[]};
|
var content = {actions:[], reset:false};
|
||||||
for (var key in _actions)
|
for (var key in _actions)
|
||||||
{
|
{
|
||||||
if (_actions[key]['children'] && this.flat_list)
|
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->save_repository(true, 'default');
|
||||||
$GLOBALS['egw']->preferences->read(true);
|
$GLOBALS['egw']->preferences->read(true);
|
||||||
break;
|
break;
|
||||||
|
case 'reset':
|
||||||
|
if ($setting) $GLOBALS['egw']->preferences->change_preference($app, $id,'', null, 'user');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,10 @@
|
|||||||
<description value="default visible actions" label="%s:"/>
|
<description value="default visible actions" label="%s:"/>
|
||||||
<taglist id="actions" editModeEnabled="false" allowFreeEntries="false" autocomplete_url=' ' class="et2_fullWidth"/>
|
<taglist id="actions" editModeEnabled="false" allowFreeEntries="false" autocomplete_url=' ' class="et2_fullWidth"/>
|
||||||
</row>
|
</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>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
Reference in New Issue
Block a user