remove reset columns button from resource grid

since we now have the client settings, we do not need this anymore

also rename the stateid to 'grid-resource'
(we want to establish a convention to differentiate between saved local
storage items)

the whole saveCurrentState logic was not really necessary, so we can drop this too

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2016-11-08 10:50:42 +01:00 committed by Dietmar Maurer
parent c76d010656
commit ac419eb9a2

View File

@ -3,10 +3,6 @@ Ext.define('PVE.grid.ResourceGrid', {
alias: ['widget.pveResourceGrid'],
border: false,
saveCurrentState: function(){
var me = this;
me.saveState();
},
defaultSorter: {
property: 'type',
direction: 'ASC'
@ -152,20 +148,8 @@ Ext.define('PVE.grid.ResourceGrid', {
Ext.apply(me, {
store: store,
stateful: true,
stateId: 'resourcegrid',
stateId: 'grid-resource',
tbar: [
{
xtype: 'button',
itemId: 'resetbutton',
tooltip: gettext("Reset Columns"),
iconCls: 'fa fa-fw fa-columns x-button-reset',
handler: function(button, e, opts) {
var sp = Ext.state.Manager.getProvider();
me.getStore().sort(me.defaultSorter);
me.reconfigure(null, PVE.data.ResourceStore.defaultColums());
sp.clear(me.stateId);
}
},
'->',
gettext('Search') + ':', ' ',
{
@ -193,11 +177,7 @@ Ext.define('PVE.grid.ResourceGrid', {
},
destroy: function() {
rstore.un("load", load_cb);
},
columnschanged: 'saveCurrentState',
columnresize: 'saveCurrentState',
columnmove: 'saveCurrentState',
sortchange: 'saveCurrentState'
}
},
columns: coldef
});