Commit 055f384f authored by Dietmar Maurer's avatar Dietmar Maurer

PendingObjectGrid.: inherit from PVE.grid.ObjectGrid

To avoid code duplication.
parent f32dd2cc
Ext.define('PVE.grid.PendingObjectGrid', {
extend: 'Ext.grid.GridPanel',
extend: 'PVE.grid.ObjectGrid',
alias: ['widget.pvePendingObjectGrid'],
getObjectValue: function(key, defaultValue, pending) {
......@@ -72,51 +72,6 @@ Ext.define('PVE.grid.PendingObjectGrid', {
});
}
var rstore = me.rstore;
var store = Ext.create('PVE.data.DiffStore', { rstore: rstore });
if (me.sorterFn) {
store.sorters.add(new Ext.util.Sorter({
sorterFn: me.sorterFn
}));
}
store.filters.add(new Ext.util.Filter({
filterFn: function(item) {
if (rows) {
var rowdef = rows[item.data.key];
if (!rowdef || (rowdef.visible === false)) {
return false;
}
}
return true;
}
}));
PVE.Utils.monStoreErrors(me, rstore);
Ext.applyIf(me, {
store: store,
hideHeaders: true,
stateful: false,
columns: [
{
header: gettext('Name'),
width: me.cwidth1 || 100,
dataIndex: 'key',
renderer: me.renderKey
},
{
flex: 1,
header: gettext('Value'),
dataIndex: 'value',
renderer: me.renderValue
}
]
});
me.callParent();
}
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment