cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jessicaw...@apache.org
Subject git commit: Bug 14981: cloudstack UI - update Host - OS Category dropdown - assign empty string instead of null as id to blank option. When Apply button is clicked, check whether the option id is empty string instead of English word 'None' which doesn't
Date Wed, 24 Oct 2012 21:18:58 GMT
Updated Branches:
  refs/heads/master 7ed60961f -> 6ad1ed05e


Bug 14981: cloudstack UI - update Host - OS Category dropdown - assign empty string instead
of null as id to blank option. When Apply button is clicked, check whether the option id is
empty string instead of English word 'None' which doesn't work for non-English environment.


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

Branch: refs/heads/master
Commit: 6ad1ed05e3fa623f0a5ad94091b0bfc99aa534a2
Parents: 7ed6096
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Wed Oct 24 14:01:13 2012 -0700
Committer: Jessica Wang <jessica.wang@citrix.com>
Committed: Wed Oct 24 14:18:05 2012 -0700

----------------------------------------------------------------------
 ui/scripts/system.js |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6ad1ed05/ui/scripts/system.js
----------------------------------------------------------------------
diff --git a/ui/scripts/system.js b/ui/scripts/system.js
index ef18601..4eadf09 100644
--- a/ui/scripts/system.js
+++ b/ui/scripts/system.js
@@ -8208,7 +8208,7 @@
                   var array1 = [];
                   array1.push("&hosttags=" + todb(args.data.hosttags));
 
-                  if (args.data.oscategoryid != null)
+                  if (args.data.oscategoryid != null && args.data.oscategoryid.length
> 0)
                     array1.push("&osCategoryId=" + args.data.oscategoryid);
 
                   $.ajax({
@@ -8425,13 +8425,12 @@
                           async: true,
                           success: function(json) {
                             var oscategoryObjs = json.listoscategoriesresponse.oscategory;
-                            var items = [];
+                            var items = [
+                              { id: '', description: _l('label.none') }
+                            ];
                             $(oscategoryObjs).each(function() {
-                              if(this.name == 'None')
-                                items.unshift({ id: this.id, description: _l('label.none')
});
-                              else
-                                items.push({id: this.id, description: this.name});
-                            });
+                              items.push({id: this.id, description: this.name});
+                            });														
                             args.response.success({data: items});
                           }
                         });


Mime
View raw message