community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1654170 - /comdev/projects.apache.org/site/js/projects.js
Date Fri, 23 Jan 2015 10:34:15 GMT
Author: humbedooh
Date: Fri Jan 23 10:34:15 2015
New Revision: 1654170

URL: http://svn.apache.org/r1654170
Log:
sort the right way and caseless

Modified:
    comdev/projects.apache.org/site/js/projects.js

Modified: comdev/projects.apache.org/site/js/projects.js
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/js/projects.js?rev=1654170&r1=1654169&r2=1654170&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Fri Jan 23 10:34:15 2015
@@ -478,7 +478,7 @@ function renderProjectsList(cat) {
     for (i in projects) {
 	projectsSortedX.push([i, projects[i].name]);
     }
-    projectsSortedX.sort(function(a,b) { return a[1] < b[1] ? 1 : a[1] > b[1] ? -1
: 0 })
+    projectsSortedX.sort(function(a,b) { return a[1].toLowerCase() > b[1].toLowerCase()
? 1 : a[1].toLowerCase() < b[1].toLowerCase() ? -1 : 0 })
     for (i in projectsSortedX) {
 	projectsSorted.push(projectsSortedX[i][0])
     }



Mime
View raw message