[pve-devel] r6392 - in pve-manager/pve2: . www/manager www/manager/window
svn-commits at proxmox.com
svn-commits at proxmox.com
Tue Aug 2 07:44:29 CEST 2011
Author: dietmar
Date: 2011-08-02 07:44:29 +0200 (Tue, 02 Aug 2011)
New Revision: 6392
Modified:
pve-manager/pve2/ChangeLog
pve-manager/pve2/www/manager/Utils.js
pve-manager/pve2/www/manager/window/Edit.js
Log:
* www/manager/window/Edit.js: convert empty array to ''
Modified: pve-manager/pve2/ChangeLog
===================================================================
--- pve-manager/pve2/ChangeLog 2011-08-02 04:45:24 UTC (rev 6391)
+++ pve-manager/pve2/ChangeLog 2011-08-02 05:44:29 UTC (rev 6392)
@@ -1,3 +1,7 @@
+2011-08-02 Proxmox Support Team <support at proxmox.com>
+
+ * www/manager/window/Edit.js: convert empty array to ''
+
2011-07-29 Proxmox Support Team <support at proxmox.com>
* debian/changelog.Debian: update version to 2.0-3
Modified: pve-manager/pve2/www/manager/Utils.js
===================================================================
--- pve-manager/pve2/www/manager/Utils.js 2011-08-02 04:45:24 UTC (rev 6391)
+++ pve-manager/pve2/www/manager/Utils.js 2011-08-02 05:44:29 UTC (rev 6392)
@@ -319,7 +319,7 @@
assemble_field_data: function(values, data) {
if (Ext.isObject(data)) {
Ext.Object.each(data, function(name, val) {
- if (values.hasOwnProperty(name)) {
+ if (values.hasOwnProperty(name)) {
var bucket = values[name];
if (!Ext.isArray(bucket)) {
bucket = values[name] = [bucket];
@@ -330,7 +330,7 @@
bucket.push(val);
}
} else {
- values[name] = val;
+ values[name] = val;
}
});
}
Modified: pve-manager/pve2/www/manager/window/Edit.js
===================================================================
--- pve-manager/pve2/www/manager/window/Edit.js 2011-08-02 04:45:24 UTC (rev 6391)
+++ pve-manager/pve2/www/manager/window/Edit.js 2011-08-02 05:44:29 UTC (rev 6392)
@@ -63,6 +63,13 @@
var form = me.formPanel.getForm();
var values = me.getValues();
+ Ext.Object.each(values, function(name, val) {
+ if (values.hasOwnProperty(name)) {
+ if (Ext.isArray(val) && !val.length) {
+ values[name] = '';
+ }
+ }
+ });
PVE.Utils.API2Request({
url: me.url,
More information about the pve-devel
mailing list