community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1681581 - /comdev/projects.apache.org/site/js/projects.js
Date Mon, 25 May 2015 11:16:48 GMT
Author: hboutemy
Date: Mon May 25 11:16:48 2015
New Revision: 1681581

URL: http://svn.apache.org/r1681581
Log:
added description of file currently loading

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=1681581&r1=1681580&r2=1681581&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Mon May 25 11:16:48 2015
@@ -61,7 +61,7 @@ function GetAsyncJSON(theUrl, xstate, ca
 }
 
 var fetchCount = 0;
-// Fetch an array of URLs, each with their own callback plus a final callback
+// Fetch an array of URLs, each with their description and own callback plus a final callback
 // Used to fetch everything before rendering a page that relies on multiple JSON sources.
 function GetAsyncJSONArray(urls, finalCallback) {
     var obj = document.getElementById('progress');
@@ -72,7 +72,8 @@ function GetAsyncJSONArray(urls, finalCa
     if (urls.length > 0) {
 	var a = urls.shift();
 	var URL = a[0];
-	var cb = a[1];
+        var desc = a[1];
+	var cb = a[2];
 	var xmlHttp = null;
 	if (window.XMLHttpRequest) {
 	    xmlHttp = new XMLHttpRequest();
@@ -80,7 +81,7 @@ function GetAsyncJSONArray(urls, finalCa
 	    xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
 	}
 
-	if (obj) { obj.innerHTML = "loading file #" + ( fetchCount - urls.length ) + " / " + fetchCount
}
+	if (obj) { obj.innerHTML = "loading file #" + ( fetchCount - urls.length ) + " / " + fetchCount
+ ": " + desc }
 
 	xmlHttp.open("GET", URL, true);
 	xmlHttp.send(null);
@@ -1410,13 +1411,13 @@ function buildReleases() {
 
 function preloadEverything(callback) {
     GetAsyncJSONArray([
-	    ["json/foundation/committees.json", setCommittees],
-	    ["json/foundation/groups.json", function(json) { unixgroups = json; }],
-	    ["json/foundation/people_name.json", function(json) { people = json; }],
-	    ["json/foundation/projects.json", weaveInProjects],
-	    ["json/foundation/podlings.json", weaveInProjects],
-        ["json/foundation/committees-evolution.json", function(json) { committeesEvolution
= json; }],
-        ["json/foundation/podlings-evolution.json", function(json) { evolution = json; }]
+        ["json/foundation/committees.json", "committees", setCommittees],
+        ["json/foundation/groups.json", "groups", function(json) { unixgroups = json; }],
+        ["json/foundation/people_name.json", "people", function(json) { people = json; }],
+        ["json/foundation/projects.json", "projects", weaveInProjects],
+        ["json/foundation/podlings.json", "podlings", weaveInProjects],
+        ["json/foundation/committees-evolution.json", "committees evolution", function(json)
{ committeesEvolution = json; }],
+        ["json/foundation/podlings-evolution.json", "podlings evolution", function(json)
{ evolution = json; }]
         ],
 	callback);
 }



Mime
View raw message