From a4ea37db395d3311d78035f5847fc75ec15ec458 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 3 Jul 2015 11:29:11 +0200 Subject: [PATCH] copy form/GroupSelector.js from manager to manager5 --- www/manager5/form/GroupSelector.js | 55 ++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 www/manager5/form/GroupSelector.js diff --git a/www/manager5/form/GroupSelector.js b/www/manager5/form/GroupSelector.js new file mode 100644 index 00000000..f4e4b633 --- /dev/null +++ b/www/manager5/form/GroupSelector.js @@ -0,0 +1,55 @@ +Ext.define('PVE.form.GroupSelector', { + extend: 'PVE.form.ComboGrid', + alias: ['widget.pveGroupSelector'], + + allowBlank: false, + + initComponent: function() { + var me = this; + + var store = new Ext.data.Store({ + model: 'pve-groups' + }); + + Ext.apply(me, { + store: store, + autoSelect: false, + valueField: 'groupid', + displayField: 'groupid', + listConfig: { + columns: [ + { + header: gettext('Group'), + sortable: true, + dataIndex: 'groupid', + flex: 1 + }, + { + id: 'comment', + header: gettext('Comment'), + sortable: false, + dataIndex: 'comment', + flex: 1 + } + ] + } + }); + + me.callParent(); + + store.load(); + } + +}, function() { + + Ext.define('pve-groups', { + extend: 'Ext.data.Model', + fields: [ 'groupid', 'comment' ], + proxy: { + type: 'pve', + url: "/api2/json/access/groups" + }, + idProperty: 'groupid' + }); + +}); -- 2.39.5