fix HA Group Selector display

displayField must now be set in class body, take opportunity to move out
other config properties from initComponent()
This commit is contained in:
Emmanuel Kasper 2016-02-25 16:35:57 +01:00 committed by Dietmar Maurer
parent 9ccd656a61
commit 7fc52dff20

View File

@ -2,19 +2,6 @@ Ext.define('PVE.ha.GroupSelector', {
extend: 'PVE.form.ComboGrid', extend: 'PVE.form.ComboGrid',
alias: ['widget.pveHAGroupSelector'], alias: ['widget.pveHAGroupSelector'],
initComponent: function() {
var me = this;
var store = new Ext.data.Store({
model: 'pve-ha-groups',
sorters: {
property: 'group',
order: 'DESC'
}
});
Ext.apply(me, {
store: store,
autoSelect: false, autoSelect: false,
valueField: 'group', valueField: 'group',
displayField: 'group', displayField: 'group',
@ -38,12 +25,19 @@ Ext.define('PVE.ha.GroupSelector', {
dataIndex: 'comment' dataIndex: 'comment'
} }
] ]
},
store: {
model: 'pve-ha-groups',
sorters: {
property: 'group',
order: 'DESC'
} }
}); },
initComponent: function() {
var me = this;
me.callParent(); me.callParent();
me.getStore().load();
store.load();
} }
}, function() { }, function() {