You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ra...@apache.org on 2014/11/06 05:51:51 UTC

[1/2] git commit: updated refs/heads/master to 57ad602

Repository: cloudstack
Updated Branches:
  refs/heads/master 6766b6c6e -> 57ad60257


Sorting projects alphabetically in drop down menu

Signed-off-by: Rajani Karuturi <ra...@gmail.com>


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

Branch: refs/heads/master
Commit: e03a7e6feaae2d024f2a53afd71e0230309b1085
Parents: d969364
Author: Daniel Vega <da...@corp.globo.com>
Authored: Wed Nov 5 18:30:58 2014 -0200
Committer: Rajani Karuturi <ra...@gmail.com>
Committed: Thu Nov 6 10:16:15 2014 +0530

----------------------------------------------------------------------
 ui/scripts/ui-custom/projectSelect.js | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e03a7e6f/ui/scripts/ui-custom/projectSelect.js
----------------------------------------------------------------------
diff --git a/ui/scripts/ui-custom/projectSelect.js b/ui/scripts/ui-custom/projectSelect.js
index ba4c7c7..5cb4449 100644
--- a/ui/scripts/ui-custom/projectSelect.js
+++ b/ui/scripts/ui-custom/projectSelect.js
@@ -30,11 +30,21 @@
             response: {
                 success: function(args) {
                     var projects = args.data;
+                    var arrayOfProjs = [];
 
                     $(projects).map(function(index, project) {
+                        var proj = {id: _s(project.id), html: _s(project.displaytext ? project.displaytext : project.name)};
+                        arrayOfProjs.push(proj);
+                    });
+
+                    arrayOfProjs.sort(function(a,b) {
+                        return a.html.localeCompare(b.html);
+                    });
+
+                    $(arrayOfProjs).map(function(index, project) {
                         var $option = $('<option>').val(_s(project.id));
 
-                        $option.html(_s(project.displaytext ? project.displaytext : project.name));
+                        $option.html(_s(project.html));
                         $option.appendTo($projectSelect);
                     });
                 },


[2/2] git commit: updated refs/heads/master to 57ad602

Posted by ra...@apache.org.
Merge branch '4.5'


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

Branch: refs/heads/master
Commit: 57ad60257465e0a5b0cca1cf6af1b362a5d6becf
Parents: 6766b6c e03a7e6
Author: Rajani Karuturi <ra...@gmail.com>
Authored: Thu Nov 6 10:21:30 2014 +0530
Committer: Rajani Karuturi <ra...@gmail.com>
Committed: Thu Nov 6 10:21:30 2014 +0530

----------------------------------------------------------------------
 ui/scripts/ui-custom/projectSelect.js | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------