node: repo: use more stati-schema like code style to set grouping feature

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-07-03 16:21:17 +02:00
parent faacb77fb4
commit 7705801f48

View File

@ -370,6 +370,14 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
},
],
features: [
{
ftype: 'grouping',
groupHeaderTpl: '{[ "File: " + values.name ]} ({rows.length} repositor{[values.rows.length > 1 ? "ies" : "y"]})',
enableGroupingMenu: false,
},
],
initComponent: function() {
let me = this;
@ -387,16 +395,8 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', {
},
],
});
let groupingFeature = Ext.create('Ext.grid.feature.Grouping', {
groupHeaderTpl: '{[ "File: " + values.name ]} ({rows.length} ' +
'repositor{[values.rows.length > 1 ? "ies" : "y"]})',
enableGroupingMenu: false,
});
Ext.apply(me, {
store: store,
features: [groupingFeature],
});
me.callParent();