[pve-devel] [PATCH v2 3/3] Declare data object in one statement when we want to delete a parameter

Emmanuel Kasper e.kasper at proxmox.com
Tue Aug 18 10:36:58 CEST 2015


Also add missing formatting
---
 www/manager5/form/KVComboBox.js | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/www/manager5/form/KVComboBox.js b/www/manager5/form/KVComboBox.js
index 77bf8f4..8b66dfc 100644
--- a/www/manager5/form/KVComboBox.js
+++ b/www/manager5/form/KVComboBox.js
@@ -7,7 +7,7 @@ Ext.define('PVE.form.KVComboBox', {
     extend: 'Ext.form.field.ComboBox',
     alias: 'widget.pveKVComboBox',
 
-    deleteEmpty: true,
+    deleteWhenEmpty: true,
     config: {
         comboItems: undefined
     },
@@ -21,10 +21,9 @@ Ext.define('PVE.form.KVComboBox', {
             if (val !== null && val !== '') {
                 data = {};
                 data[me.getName()] = val;
-            } else if (me.deleteEmpty) {
-		data = {};
-                data['delete'] = me.getName();
-	    }
+            } else if (me.deleteWhenEmpty) {
+				data = {'delete': me.getName()};
+	    	}
         }
         return data;
     },
-- 
2.1.4





More information about the pve-devel mailing list