From 7705801f4817c89934df127d3f3cc1dd6d0e206b Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 3 Jul 2021 16:21:17 +0200 Subject: [PATCH] node: repo: use more stati-schema like code style to set grouping feature Signed-off-by: Thomas Lamprecht --- src/node/APTRepositories.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js index c4848a0..ea9f833 100644 --- a/src/node/APTRepositories.js +++ b/src/node/APTRepositories.js @@ -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();