mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-07 16:14:58 +00:00
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:
parent
c76d010656
commit
ac419eb9a2
@ -3,10 +3,6 @@ Ext.define('PVE.grid.ResourceGrid', {
|
|||||||
alias: ['widget.pveResourceGrid'],
|
alias: ['widget.pveResourceGrid'],
|
||||||
|
|
||||||
border: false,
|
border: false,
|
||||||
saveCurrentState: function(){
|
|
||||||
var me = this;
|
|
||||||
me.saveState();
|
|
||||||
},
|
|
||||||
defaultSorter: {
|
defaultSorter: {
|
||||||
property: 'type',
|
property: 'type',
|
||||||
direction: 'ASC'
|
direction: 'ASC'
|
||||||
@ -152,20 +148,8 @@ Ext.define('PVE.grid.ResourceGrid', {
|
|||||||
Ext.apply(me, {
|
Ext.apply(me, {
|
||||||
store: store,
|
store: store,
|
||||||
stateful: true,
|
stateful: true,
|
||||||
stateId: 'resourcegrid',
|
stateId: 'grid-resource',
|
||||||
tbar: [
|
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') + ':', ' ',
|
gettext('Search') + ':', ' ',
|
||||||
{
|
{
|
||||||
@ -193,11 +177,7 @@ Ext.define('PVE.grid.ResourceGrid', {
|
|||||||
},
|
},
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
rstore.un("load", load_cb);
|
rstore.un("load", load_cb);
|
||||||
},
|
}
|
||||||
columnschanged: 'saveCurrentState',
|
|
||||||
columnresize: 'saveCurrentState',
|
|
||||||
columnmove: 'saveCurrentState',
|
|
||||||
sortchange: 'saveCurrentState'
|
|
||||||
},
|
},
|
||||||
columns: coldef
|
columns: coldef
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user