community-commits mailing list archives

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

URL: http://svn.apache.org/r1654169
Log:
better sort

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=1654169&r1=1654168&r2=1654169&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Fri Jan 23 10:32:31 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]})
+    projectsSortedX.sort(function(a,b) { return a[1] < b[1] ? 1 : a[1] > b[1] ? -1
: 0 })
     for (i in projectsSortedX) {
 	projectsSorted.push(projectsSortedX[i][0])
     }



Mime
View raw message