From 7e3fe38af3fc0951e9f5348c98d7b89271c9b388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Jochum?= Date: Tue, 8 May 2018 15:15:37 +0200 Subject: [PATCH] Modernize PVE.form.GroupSelector, MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit as example for future Uses. Signed-off-by: René Jochum --- www/manager6/form/GroupSelector.js | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/www/manager6/form/GroupSelector.js b/www/manager6/form/GroupSelector.js index e7c674ff..df59d07c 100644 --- a/www/manager6/form/GroupSelector.js +++ b/www/manager6/form/GroupSelector.js @@ -1,6 +1,16 @@ +Ext.define('pve-groups', { + extend: 'Ext.data.Model', + fields: [ 'groupid', 'comment' ], + proxy: { + type: 'proxmox', + url: "/api2/json/access/groups" + }, + idProperty: 'groupid' +}); + Ext.define('PVE.form.GroupSelector', { extend: 'Proxmox.form.ComboGrid', - alias: ['widget.pveGroupSelector'], + xtype: 'pveGroupSelector', allowBlank: false, autoSelect: false, @@ -38,21 +48,8 @@ Ext.define('PVE.form.GroupSelector', { store: store }); - me.callParent(); + me.callParent(); store.load(); } - -}, function() { - - Ext.define('pve-groups', { - extend: 'Ext.data.Model', - fields: [ 'groupid', 'comment' ], - proxy: { - type: 'proxmox', - url: "/api2/json/access/groups" - }, - idProperty: 'groupid' - }); - });