pve-manager/www/manager6/form/GroupSelector.js
Emmanuel Kasper 137f890ac7 Ext6migrate :remove unused column ID
An component id 'comment' is already defined for the column Comment of UserView.js causing here a conflict.
It seems ExtJS6 is more stringent about that than ExtJS4.
2016-01-22 11:24:23 +01:00

55 lines
900 B
JavaScript

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
},
{
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'
});
});