[pve-devel] r6351 - in pve-manager/pve2: . www/manager www/manager/dc www/manager/form
svn-commits at proxmox.com
svn-commits at proxmox.com
Fri Jul 22 09:05:27 CEST 2011
Author: dietmar
Date: 2011-07-22 09:05:27 +0200 (Fri, 22 Jul 2011)
New Revision: 6351
Modified:
pve-manager/pve2/ChangeLog
pve-manager/pve2/www/manager/Utils.js
pve-manager/pve2/www/manager/dc/AuthEdit.js
pve-manager/pve2/www/manager/dc/UserEdit.js
pve-manager/pve2/www/manager/form/ComboGrid.js
pve-manager/pve2/www/manager/form/RealmComboBox.js
pve-manager/pve2/www/manager/form/ViewSelector.js
Log:
* www/manager/Utils.js: overwrite ComboBox.onLoad to fix ExtJS
bug.
* www/manager/*: use Ext.form.field.ComboBox instead of alias
Ext.form.ComboBox (that whole ExtJS alias system cause very
strange side effects).
Modified: pve-manager/pve2/ChangeLog
===================================================================
--- pve-manager/pve2/ChangeLog 2011-07-22 05:09:08 UTC (rev 6350)
+++ pve-manager/pve2/ChangeLog 2011-07-22 07:05:27 UTC (rev 6351)
@@ -1,5 +1,12 @@
2011-07-22 Proxmox Support Team <support at proxmox.com>
+ * www/manager/Utils.js: overwrite ComboBox.onLoad to fix ExtJS
+ bug.
+
+ * www/manager/*: use Ext.form.field.ComboBox instead of alias
+ Ext.form.ComboBox (that whole ExtJS alias system cause very
+ strange side effects).
+
* www/manager/window/Edit.js (setValues): remove useless call to
form.setValues()
Modified: pve-manager/pve2/www/manager/Utils.js
===================================================================
--- pve-manager/pve2/www/manager/Utils.js 2011-07-22 05:09:08 UTC (rev 6350)
+++ pve-manager/pve2/www/manager/Utils.js 2011-07-22 07:05:27 UTC (rev 6351)
@@ -65,6 +65,16 @@
isDirty: function() { return false; }
});
+// hack: ExtJS does not display the correct value if we
+// call setValue while the store is loading, so we need
+// to call it again after loading
+Ext.override(Ext.form.field.ComboBox, {
+ onLoad: function() {
+ this.setValue(this.value, false);
+ this.callOverridden(arguments);
+ }
+});
+
Ext.define('PVE.Utils', { statics: {
// this class only contains static functions
Modified: pve-manager/pve2/www/manager/dc/AuthEdit.js
===================================================================
--- pve-manager/pve2/www/manager/dc/AuthEdit.js 2011-07-22 05:09:08 UTC (rev 6350)
+++ pve-manager/pve2/www/manager/dc/AuthEdit.js 2011-07-22 07:05:27 UTC (rev 6351)
@@ -58,7 +58,7 @@
];
var column2 = [
- Ext.create('Ext.form.ComboBox', {
+ Ext.create('Ext.form.field.ComboBox', {
fieldLabel: 'Server Type',
name: 'type',
store: Ext.create('Ext.data.Store', {
Modified: pve-manager/pve2/www/manager/dc/UserEdit.js
===================================================================
--- pve-manager/pve2/www/manager/dc/UserEdit.js 2011-07-22 05:09:08 UTC (rev 6350)
+++ pve-manager/pve2/www/manager/dc/UserEdit.js 2011-07-22 07:05:27 UTC (rev 6351)
@@ -28,7 +28,7 @@
allowBlank: false,
submitValue: me.create ? true : false
},
- new Ext.form.ComboBox({
+ new Ext.form.field.ComboBox({
fieldLabel: 'Group',
name: 'groups',
multiSelect: true,
@@ -157,6 +157,7 @@
data.expire = null;
}
}
+
me.setValues(data);
}
});
Modified: pve-manager/pve2/www/manager/form/ComboGrid.js
===================================================================
--- pve-manager/pve2/www/manager/form/ComboGrid.js 2011-07-22 05:09:08 UTC (rev 6350)
+++ pve-manager/pve2/www/manager/form/ComboGrid.js 2011-07-22 07:05:27 UTC (rev 6351)
@@ -1,5 +1,5 @@
Ext.define('PVE.form.ComboGrid', {
- extend: 'Ext.form.ComboBox',
+ extend: 'Ext.form.field.ComboBox',
requires: [
'Ext.grid.Panel',
'PVE.Utils'
Modified: pve-manager/pve2/www/manager/form/RealmComboBox.js
===================================================================
--- pve-manager/pve2/www/manager/form/RealmComboBox.js 2011-07-22 05:09:08 UTC (rev 6350)
+++ pve-manager/pve2/www/manager/form/RealmComboBox.js 2011-07-22 07:05:27 UTC (rev 6351)
@@ -1,5 +1,5 @@
Ext.define('PVE.form.RealmComboBox', {
- extend: 'Ext.form.ComboBox',
+ extend: 'Ext.form.field.ComboBox',
requires: ['Ext.data.Store', 'PVE.RestProxy'],
alias: ['widget.pveRealmComboBox'],
Modified: pve-manager/pve2/www/manager/form/ViewSelector.js
===================================================================
--- pve-manager/pve2/www/manager/form/ViewSelector.js 2011-07-22 05:09:08 UTC (rev 6350)
+++ pve-manager/pve2/www/manager/form/ViewSelector.js 2011-07-22 07:05:27 UTC (rev 6351)
@@ -1,5 +1,5 @@
Ext.define('PVE.form.ViewSelector', {
- extend: 'Ext.form.ComboBox',
+ extend: 'Ext.form.field.ComboBox',
requires: ['Ext.data.Store'],
alias: ['widget.pveViewSelector'],
More information about the pve-devel
mailing list