[pve-devel] [PATCH pve-manager 2/3] ext6migrate: move static class properties out of initComponent()

Emmanuel Kasper e.kasper at proxmox.com
Mon Nov 16 14:02:15 CET 2015


Besides fitting more with the declarative style of ExtJS, this has the
interesting side effect of allowing comboboxes to work with ExtJS6
---
 www/manager6/form/KVComboBox.js | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/www/manager6/form/KVComboBox.js b/www/manager6/form/KVComboBox.js
index 5247c86..b80a062 100644
--- a/www/manager6/form/KVComboBox.js
+++ b/www/manager6/form/KVComboBox.js
@@ -11,7 +11,11 @@ Ext.define('PVE.form.KVComboBox', {
 
     deleteEmpty: true,
     comboItems: undefined,
+    displayField: 'value',
+    valueField: 'key',
+    queryMode: 'local',
 
+    // overide framework function to implement deleteEmpty behaviour
     getSubmitData: function() {
         var me = this,
             data = null,
@@ -41,12 +45,6 @@ Ext.define('PVE.form.KVComboBox', {
 	    me.editable = false;
 	}
 
-	Ext.apply(me, {
-	    displayField: 'value',
-	    valueField: 'key',
-	    queryMode: 'local'
-	});
-
 	me.callParent();
     }
 });
-- 
2.1.4





More information about the pve-devel mailing list