community-commits mailing list archives

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

URL: http://svn.apache.org/r1654166
Log:
Sort alphabetically

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=1654166&r1=1654165&r2=1654166&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Fri Jan 23 10:27:58 2015
@@ -473,6 +473,15 @@ function setCycles(json, state) {
 function renderProjectsList(cat) {
 
     var obj = document.getElementById('contents');
+    var projectsSortedX = []
+    var projectsSorted = []
+    for (i in projects) {
+	projectsSortedX.push([i, projects[i].name]);
+    }
+    projectsSortedX.sort(function(a,b) { return a[1] - b[1]})
+    for (i in projectsSortedX) {
+	projectsSorted.push(projectsSortedX[i])
+    }
     
     if (cat == "name") {
 	// Title + description
@@ -529,7 +538,7 @@ function renderProjectsList(cat) {
 	    var li = document.createElement('li');
 	    li.innerHTML = "<h3><a id='" + lang + "'>" + lang + " (" + lcount[lang]
+ ")</a>:</h3>"
 	    var cul = document.createElement('ul');
-	    for (i in projects) {
+	    for (i in projesctsSorted) {
 		if (projects[i]['programming-language']) {
 		    var a = projects[i]['programming-language'].split(/,\s*/)
 		    for (x in a) {
@@ -585,7 +594,7 @@ function renderProjectsList(cat) {
 	    var li = document.createElement('li');
 	    li.innerHTML = "<h3><a id='" + lang + "'>" + lang + " (" + ccount[lang]
+ ")</a>:</h3>"
 	    var cul = document.createElement('ul');
-	    for (i in projects) {
+	    for (i in projectsSorted) {
 		if (projects[i].category) {
 		    var a = projects[i]['category'].split(/,\s*/)
 		    for (x in a) {
@@ -639,7 +648,7 @@ function renderProjectsList(cat) {
 	    var li = document.createElement('li');
 	    li.innerHTML = "<h3><a id='" + date + "'>" + date + " (" + dcount[date]
+ ")</a>:</h3>"
 	    var cul = document.createElement('ul');
-	    for (i in projects) {
+	    for (i in projectsSorted) {
 		 if (committees[projects[i].name]) {
 		    xdate = committees[projects[i].name]
 		    if (xdate == date) {
@@ -686,7 +695,7 @@ function renderProjectsList(cat) {
 	
 	for (l in lens) {
 	    var len = lens[l]
-	    for (i in projects) {
+	    for (i in projectsSorted) {
 		if (unixgroups[i]) {
 		    var xlen = unixgroups[i].length
 		    if (xlen == len) {
@@ -742,7 +751,7 @@ function renderProjectsList(cat) {
 	    var li = document.createElement('li');
 	    li.innerHTML = "<h3><a id='" + lpmc + "'>" + pmcs[lpmc].name + " (" + dcount[lpmc]
+ ")</a>:</h3>"
 	    var cul = document.createElement('ul');
-	    for (i in projects) {
+	    for (i in projectsSorted) {
 		// Fix Incubating projects
 		if (projects[i].name.match("incubating", "i")) {
 		    projects[i].pmc = 'incubator'



Mime
View raw message