]> git.proxmox.com Git - pve-manager.git/commitdiff
ext6migrate: move static class properties out of initComponent()
authorEmmanuel Kasper <e.kasper@proxmox.com>
Mon, 16 Nov 2015 13:02:15 +0000 (14:02 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 22 Jan 2016 10:24:13 +0000 (11:24 +0100)
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

index 5247c862c9700c85170f34fc828333922115e050..b80a062a9a4597dca8b363e3b6e3b2c208f66a9d 100644 (file)
@@ -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();
     }
 });