community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1679809 - in /comdev/projects.apache.org/site: js/projects.js timelines.html
Date Sat, 16 May 2015 21:51:46 GMT
Author: hboutemy
Date: Sat May 16 21:51:46 2015
New Revision: 1679809

URL: http://svn.apache.org/r1679809
Log:
workaround anchors support

Modified:
    comdev/projects.apache.org/site/js/projects.js
    comdev/projects.apache.org/site/timelines.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=1679809&r1=1679808&r2=1679809&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Sat May 16 21:51:46 2015
@@ -24,8 +24,6 @@ var tlpsByName = {}; // name -> tlp info
 var tlpsEvolution = {}; // TLPs sorted by date founded, with retired (name = "retired: name")
 var projects = {}; // Projects (main project or sub-project from a TLP)
 var evolution = {}; // Podling evolution
-var accounts = {}; // Account creation lookups
-var releases = {}; // Release data
 
 // --------- Global helpers ----------- \\
 
@@ -602,6 +600,10 @@ function renderProjectsByLanguage() {
 	}
 	
 	obj.appendChild(ul);
+
+    if (location.hash.length > 1) {
+        setTimeout(function() { location.href = location.href;}, 250);
+    }
 }
 
 function renderProjectsByCategory() {
@@ -652,6 +654,10 @@ function renderProjectsByCategory() {
 	}
 	
 	obj.appendChild(ul);
+
+    if (location.hash.length > 1) {
+        setTimeout(function() { location.href = location.href;}, 250);
+    }
 }
 
 function renderProjectsByDate() {
@@ -690,6 +696,10 @@ function renderProjectsByDate() {
 	}
 	
 	obj.appendChild(ul);
+
+    if (location.hash.length > 1) {
+        setTimeout(function() { location.href = location.href;}, 250);
+    }
 }
 
 function renderProjectsByNumber() {
@@ -786,6 +796,10 @@ function renderProjectsByPMC() {
 	}
 	
 	obj.appendChild(ul);
+
+    if (location.hash.length > 1) {
+        setTimeout(function() { location.href = location.href;}, 250);
+    }
 }
 
 function buildProjectsList(json) {
@@ -1126,11 +1140,10 @@ function buildFrontPage() {
 
 // ------- Account creation chart function -------- \\
 
-function drawAccountCreation() {
+function drawAccountCreation(json) {
     var i;
     var j;
     var narr = [];
-    var json = accounts;
     var obj = document.createElement('div');
     obj.style = "float: left; width: 1160px; height: 450px;";
     obj.setAttribute("id", 'accountchart');
@@ -1177,7 +1190,10 @@ function drawAccountCreation() {
 
     var chart = new google.visualization.ComboChart(obj);
     chart.draw(cdata, options);
+}
 
+function buildTimelines() {
+    GetAsyncJSON("/json/foundation/accounts-evolution.json", null, drawAccountCreation);
 }
 
 
@@ -1273,7 +1289,7 @@ function setTlps(json, state) {
 }
 
 // Render releases using datatables
-function renderReleases() {
+function renderReleases(releases) {
     var arr = [];
     for (p in releases) {
 	var releasedata = releases[p];
@@ -1310,10 +1326,7 @@ function renderReleases() {
 }
 
 function buildReleases() {
-    GetAsyncJSONArray([
-            ["/json/foundation/releases.json", function(json) { releases = json; }]
-        ],
-        renderReleases);
+    GetAsyncJSON("/json/foundation/releases.json", null, renderReleases);
 }
 
 // ------------ Async data fetching ------------\\
@@ -1329,8 +1342,7 @@ function preloadEverything(callback) {
 	    ["/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/podlings-evolution.json", function(json) { evolution = json; }]
         ],
 	callback);
 }

Modified: comdev/projects.apache.org/site/timelines.html
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/timelines.html?rev=1679809&r1=1679808&r2=1679809&view=diff
==============================================================================
--- comdev/projects.apache.org/site/timelines.html (original)
+++ comdev/projects.apache.org/site/timelines.html Sat May 16 21:51:46 2015
@@ -36,7 +36,7 @@
 </div>
 <script type="text/javascript">
    google.load("visualization", "1", {packages:["corechart"]});
-   google.setOnLoadCallback(function() { preloadEverything(drawAccountCreation)});
+   google.setOnLoadCallback(function() { buildTimelines(); });
 </script>
 </body>
 <html>



Mime
View raw message