border: false,
defaultSorter: {
property: 'type',
- direction: 'ASC'
+ direction: 'ASC',
},
initComponent : function() {
var me = this;
var store = Ext.create('Ext.data.Store', {
model: 'PVEResources',
sorters: me.defaultSorter,
- proxy: { type: 'memory' }
+ proxy: { type: 'memory' },
});
var textfilter = '';
var updateGrid = function() {
var filterfn = me.viewFilter ? me.viewFilter.filterfn : null;
-
+
//console.log("START GRID UPDATE " + me.viewFilter);
store.suspendEvents();
for (key in nodeidx) {
if (nodeidx.hasOwnProperty(key)) {
var item = nodeidx[key];
-
- // getById() use find(), which is slow (ExtJS4 DP5)
+
+ // getById() use find(), which is slow (ExtJS4 DP5)
//var olditem = store.getById(item.data.id);
var olditem = store.data.get(item.data.id);
}
if (changes) {
olditem.endEdit(true);
- olditem.commit(true);
+ olditem.commit(true);
}
}
}
updateGrid();
});
- var load_cb = function() {
- updateGrid();
+ var load_cb = function() {
+ updateGrid();
};
Ext.apply(me, {
stateful: true,
stateId: 'grid-resource',
tbar: [
- '->',
+ '->',
gettext('Search') + ':', ' ',
{
xtype: 'textfield',
var v = field.getValue();
textfilter = v.toLowerCase();
filter_task.delay(500);
- }
- }
- }
+ },
+ },
+ },
],
viewConfig: {
- stripeRows: true
+ stripeRows: true,
},
listeners: {
itemcontextmenu: PVE.Utils.createCmdMenu,
},
destroy: function() {
rstore.un("load", load_cb);
- }
+ },
},
- columns: coldef
+ columns: coldef,
});
me.callParent();
updateGrid();
rstore.on("load", load_cb);
- }
+ },
});