]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
node: repo: use more stati-schema like code style to set grouping feature
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 3 Jul 2021 14:21:17 +0000 (16:21 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 3 Jul 2021 14:21:17 +0000 (16:21 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/node/APTRepositories.js

index c4848a0090005913b60dc875fb568775b2bf153d..ea9f83318c715604e6ddec6ecdbcc2687d185f91 100644 (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();