[pve-devel] [PATCH pve-manager 1/2] Modernize PVE.form.GroupSelector,

René Jochum r.jochum at proxmox.com
Tue May 8 15:15:37 CEST 2018


as example for future Uses.

Signed-off-by: René Jochum <r.jochum at proxmox.com>
---
 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'
-    });
-
 });
-- 
2.11.0




More information about the pve-devel mailing list