[pve-devel] [PATCH 1/3] ext6migrate: move static fields to class body
Emmanuel Kasper
e.kasper at proxmox.com
Tue Jan 26 17:15:53 CET 2016
Some fields need to be processed by initConfig(),
which will be run before initComponent() in the
component lifecycle.
This fix the problem of the Selector default value
whihc was not loading.
---
www/manager6/form/ViewSelector.js | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/www/manager6/form/ViewSelector.js b/www/manager6/form/ViewSelector.js
index 32181e2..3a80a3d 100644
--- a/www/manager6/form/ViewSelector.js
+++ b/www/manager6/form/ViewSelector.js
@@ -5,6 +5,14 @@ Ext.define('PVE.form.ViewSelector', {
extend: 'Ext.form.field.ComboBox',
alias: ['widget.pveViewSelector'],
+ editable: false,
+ allowBlank: false,
+ forceSelection: true,
+ autoSelect: false,
+ valueField: 'key',
+ displayField: 'value',
+ hideLabel: true,
+
initComponent: function() {
var me = this;
@@ -51,16 +59,8 @@ Ext.define('PVE.form.ViewSelector', {
});
Ext.apply(me, {
- hideLabel: true,
store: store,
value: groupdef[0][0],
- editable: false,
- allowBlank: false,
- forceSelection: true,
- autoSelect: false,
- valueField: 'key',
- displayField: 'value',
-
getViewFilter: function() {
var view = me.getValue();
return Ext.apply({ id: view }, default_views[view] || default_views.server);
@@ -96,7 +96,6 @@ Ext.define('PVE.form.ViewSelector', {
};
var sp = Ext.state.Manager.getProvider();
-
me.mon(sp, 'statechange', statechange, me);
}
});
--
2.1.4
More information about the pve-devel
mailing list