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

René Jochum r.jochum at proxmox.com
Fri May 4 16:06:46 CEST 2018


Signed-off-by: René Jochum <r.jochum at proxmox.com>
---
 www/manager6/form/GroupSelector.js | 25 +++++++++++--------------
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/www/manager6/form/GroupSelector.js b/www/manager6/form/GroupSelector.js
index e7c674ff..0b7c2280 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,
@@ -42,17 +52,4 @@ Ext.define('PVE.form.GroupSelector', {
 
 	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