You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2013/02/06 03:43:29 UTC

[10/50] [abbrv] git commit: refs/heads/storage_refactor - Providing invalid values for gateway, netmask etc in the zoneWizard blocks the VLAN container to load , throwing an error

Providing invalid values for gateway, netmask etc in the zoneWizard blocks the VLAN container to load , throwing an error


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/c61156e9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/c61156e9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/c61156e9

Branch: refs/heads/storage_refactor
Commit: c61156e9651d42295a5dca554af2de73cd442ec7
Parents: 9a44ecf
Author: Brian Federle <br...@citrix.com>
Authored: Tue Feb 5 11:47:20 2013 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Tue Feb 5 11:47:20 2013 +0530

----------------------------------------------------------------------
 ui/scripts/ui/utils.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/c61156e9/ui/scripts/ui/utils.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui/utils.js b/ui/scripts/ui/utils.js
index 567f566..7a6fb2f 100644
--- a/ui/scripts/ui/utils.js
+++ b/ui/scripts/ui/utils.js
@@ -23,7 +23,7 @@
 
     $($form.serializeArray()).each(function() {
       var dataItem = data[this.name];
-      var value = this.value;
+      var value = this.value.toString();
 
       if (options.escapeSlashes) {
         value = value.replace(/\//g, '__forwardSlash__');
@@ -31,9 +31,9 @@
 
       if (!dataItem) {
         data[this.name] = value;
-      } else if (dataItem && !$(dataItem).size()) {
+      } else if (dataItem && !$.isArray(dataItem)) {
         data[this.name] = [dataItem, value];
-      } else {
+      } else if($.isArray(dataItem)){
         dataItem.push(value);
       }
     });