community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1679803 - in /comdev/projects.apache.org/site: js/projects.js releases.html
Date Sat, 16 May 2015 20:50:27 GMT
Author: hboutemy
Date: Sat May 16 20:50:26 2015
New Revision: 1679803

URL: http://svn.apache.org/r1679803
Log:
load (heavy) releases.json only on releases.hmtl page

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

Modified: comdev/projects.apache.org/site/js/projects.js
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/js/projects.js?rev=1679803&r1=1679802&r2=1679803&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Sat May 16 20:50:26 2015
@@ -1273,7 +1273,7 @@ function setTlps(json, state) {
 }
 
 // Render releases using datatables
-function buildReleases() {
+function renderReleases() {
     var arr = [];
     for (p in releases) {
 	var releasedata = releases[p];
@@ -1309,6 +1309,13 @@ function buildReleases() {
     } );
 }
 
+function buildReleases() {
+    GetAsyncJSONArray([
+            ["/json/foundation/releases.json", function(json) { releases = json; }]
+        ],
+        renderReleases);
+}
+
 // ------------ Async data fetching ------------\\
 // This function is the starter of every page, and preloads the needed files
 // before running the final page renderer. This is roughly 1 mb of JSON, but as
@@ -1321,10 +1328,9 @@ function preloadEverything(callback) {
 	    ["/json/foundation/people_name.json", function(json) { people = json; }],
 	    ["/json/foundation/projects.json", weaveInProjects],
 	    ["/json/foundation/podlings.json", weaveInProjects],
-            ["/json/foundation/tlps-evolution.json", function(json) { tlpsEvolution = json;
}],
-            ["/json/foundation/podlings-evolution.json", function(json) { evolution = json;
}],
-            ["/json/foundation/accounts-evolution.json", function(json) { accounts = json;
}],
-	    ["/json/foundation/releases.json", function(json) { releases = json; }]
+        ["/json/foundation/tlps-evolution.json", function(json) { tlpsEvolution = json; }],
+        ["/json/foundation/podlings-evolution.json", function(json) { evolution = json; }],
+        ["/json/foundation/accounts-evolution.json", function(json) { accounts = json; }]
         ],
 	callback);
 }

Modified: comdev/projects.apache.org/site/releases.html
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/releases.html?rev=1679803&r1=1679802&r2=1679803&view=diff
==============================================================================
--- comdev/projects.apache.org/site/releases.html (original)
+++ comdev/projects.apache.org/site/releases.html Sat May 16 20:50:26 2015
@@ -14,7 +14,7 @@
    
    <title>Apache Projects Directory</title>
 </head>
-<body onload="preloadEverything(buildReleases);">
+<body onload="buildReleases();">
 
 <div id="logo"></div>
 <div id='cssmenu'>



Mime
View raw message