Ext6migrate: move static configuration from instantiation time to class declaration time.
This fixes the problem that this ComboGrid was displayed with an empty value ( similar the to the Keyboard Selection and Realm Selection in the login window)
This commit is contained in:
parent
a821979447
commit
16251ba9f6
@ -3,6 +3,25 @@ Ext.define('PVE.form.GroupSelector', {
|
||||
alias: ['widget.pveGroupSelector'],
|
||||
|
||||
allowBlank: false,
|
||||
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
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
initComponent: function() {
|
||||
var me = this;
|
||||
@ -13,25 +32,6 @@ Ext.define('PVE.form.GroupSelector', {
|
||||
|
||||
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();
|
||||
|
@ -2,6 +2,37 @@ Ext.define('PVE.form.StorageSelector', {
|
||||
extend: 'PVE.form.ComboGrid',
|
||||
alias: ['widget.PVE.form.StorageSelector'],
|
||||
|
||||
allowBlank: false,
|
||||
valueField: 'storage',
|
||||
displayField: 'storage',
|
||||
listConfig: {
|
||||
columns: [
|
||||
{
|
||||
header: gettext('Name'),
|
||||
dataIndex: 'storage',
|
||||
hideable: false,
|
||||
flex: 1
|
||||
},
|
||||
{
|
||||
header: gettext('Type'),
|
||||
width: 60,
|
||||
dataIndex: 'type'
|
||||
},
|
||||
{
|
||||
header: gettext('Avail'),
|
||||
width: 80,
|
||||
dataIndex: 'avail',
|
||||
renderer: PVE.Utils.format_size
|
||||
},
|
||||
{
|
||||
header: gettext('Capacity'),
|
||||
width: 80,
|
||||
dataIndex: 'total',
|
||||
renderer: PVE.Utils.format_size
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
reloadStorageList: function() {
|
||||
var me = this;
|
||||
if (!me.nodename) {
|
||||
@ -67,36 +98,6 @@ Ext.define('PVE.form.StorageSelector', {
|
||||
|
||||
Ext.apply(me, {
|
||||
store: store,
|
||||
allowBlank: false,
|
||||
valueField: 'storage',
|
||||
displayField: 'storage',
|
||||
listConfig: {
|
||||
columns: [
|
||||
{
|
||||
header: gettext('Name'),
|
||||
dataIndex: 'storage',
|
||||
hideable: false,
|
||||
flex: 1
|
||||
},
|
||||
{
|
||||
header: gettext('Type'),
|
||||
width: 60,
|
||||
dataIndex: 'type'
|
||||
},
|
||||
{
|
||||
header: gettext('Avail'),
|
||||
width: 80,
|
||||
dataIndex: 'avail',
|
||||
renderer: PVE.Utils.format_size
|
||||
},
|
||||
{
|
||||
header: gettext('Capacity'),
|
||||
width: 80,
|
||||
dataIndex: 'total',
|
||||
renderer: PVE.Utils.format_size
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
me.callParent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user