From eb1fff82949b8ad16de43317570d3ee5ff135f6d Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Sat, 3 Jul 2021 16:34:38 +0200 Subject: [PATCH] node: repo: use more stati-schema like code style to configure store Signed-off-by: Thomas Lamprecht --- src/node/APTRepositories.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/node/APTRepositories.js b/src/node/APTRepositories.js index ea9f833..97878b3 100644 --- a/src/node/APTRepositories.js +++ b/src/node/APTRepositories.js @@ -378,6 +378,18 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', { }, ], + + store: { + model: 'apt-repolist', + groupField: 'Path', + sorters: [ + { + property: 'Index', + direction: 'ASC', + }, + ], + }, + initComponent: function() { let me = this; @@ -385,20 +397,6 @@ Ext.define('Proxmox.node.APTRepositoriesGrid', { throw "no node name specified"; } - let store = Ext.create('Ext.data.Store', { - model: 'apt-repolist', - groupField: 'Path', - sorters: [ - { - property: 'Index', - direction: 'ASC', - }, - ], - }); - Ext.apply(me, { - store: store, - }); - me.callParent(); }, });