incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [12/22] 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
Date Thu, 25 Oct 2012 08:17:54 GMT
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/e4394f0f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e4394f0f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e4394f0f

Branch: refs/heads/marvin-parallel
Commit: e4394f0fff2c94f889d616026116999e66087eea
Parents: 17a1616
Author: Jessica Wang <jessica.wang@citrix.com>
Authored: Wed Oct 24 14:01:13 2012 -0700
Committer: Prasanna Santhanam <tsp@apache.org>
Committed: Thu Oct 25 13:47:32 2012 +0530

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


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e4394f0f/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