aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Luong2013-05-23 16:50:37 (EDT)
committerlibing wang2013-05-24 07:42:25 (EDT)
commitbb3087ff3a103d0c66ee20cfc1c7366c8bd9c610 (patch)
tree6cc233f227501538cf6ff8af2385727d6b843066
parent726e3df4769695bc326190eeb1bd28b1bf3d24e8 (diff)
downloadorg.eclipse.orion.client-bb3087ff3a103d0c66ee20cfc1c7366c8bd9c610.zip
org.eclipse.orion.client-bb3087ff3a103d0c66ee20cfc1c7366c8bd9c610.tar.gz
org.eclipse.orion.client-bb3087ff3a103d0c66ee20cfc1c7366c8bd9c610.tar.bz2
Bug 387125 - can we sort the site index?
-rw-r--r--bundles/org.eclipse.orion.client.ui/web/orion/sites/sitesExplorer.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/sites/sitesExplorer.js b/bundles/org.eclipse.orion.client.ui/web/orion/sites/sitesExplorer.js
index e85610a..a57097c 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/sites/sitesExplorer.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/sites/sitesExplorer.js
@@ -65,7 +65,17 @@ define(['i18n!orion/sites/nls/messages', 'orion/i18nUtil', 'orion/explorers/expl
function(/**Array*/ siteConfigurations) {
var item = {};
item.siteService = siteServices[0];
- item.siteConfigurations = siteConfigurations;
+ if (siteConfigurations) {
+ item.siteConfigurations = siteConfigurations.sort(function(a, b) {
+ var n1 = a.Name && a.Name.toLowerCase();
+ var n2 = b.Name && b.Name.toLowerCase();
+ if (n1 < n2) { return -1; }
+ if (n1 > n2) { return 1; }
+ return 0;
+ });
+ } else {
+ item.siteConfigurations = [];
+ }
result.push(item);
that._getSiteConfigurations(siteServices.slice(1), result, deferred);