community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1678586 - /comdev/projects.apache.org/site/js/projects.js
Date Sun, 10 May 2015 17:14:17 GMT
Author: hboutemy
Date: Sun May 10 17:14:17 2015
New Revision: 1678586

URL: http://svn.apache.org/r1678586
Log:
improved tooltip

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=1678586&r1=1678585&r2=1678586&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Sun May 10 17:14:17 2015
@@ -865,6 +865,12 @@ function isTLP(project) {
 }
 
 // ------------ Front page rendering ------------\\
+function htmlListTooltip(date,name,values) {
+    return '<div style="padding:8px 8px 8px 8px;"><b>' + date + '</b>'
+	+ '<br/>' + name + ': <b>' + values.length + '</b>'
+	+ ((values.length > 0) ? '<br/>- '+values.join('<br/>- '):'')
+	+ '</div>';
+}
 
 function renderFrontPage() {
     numchairs = 0;
@@ -912,13 +918,7 @@ function renderFrontPage() {
 	    }
 	}
 	cur += newTlps.length - retiredTlps.length;
-	var evo = '' + i + " (" + cur + "): " + ((newTlps.length == 0) ? "No new Top Level Project"
: newTlps.join(", "));
-	if (retiredTlps.length>0) {
-	    evo += ", retired " + retiredTlps.join(", ")
-	}
-	var newTooltip = 'New TLPs: <b>' + newTlps.length + '</b>' + ((newTlps.length
> 0) ? '<br/>- '+newTlps.join('<br/>- '):'');
-	var retiredTooltip = 'Retired TLPs: <b>' + retiredTlps.length + '</b>' + ((retiredTlps.length
> 0) ? '<br/>- '+retiredTlps.join('<br/>- '):'');
-	parr.push([i, newTlps.length, newTooltip, retiredTlps.length, retiredTooltip, cur, evo]);
+	parr.push([i, newTlps.length, htmlListTooltip(i, 'New TLPs', newTlps), retiredTlps.length,
htmlListTooltip(i, 'Retired TLPs', retiredTlps), cur]);
     }
     //narr.sort(function(a,b) { return (b[1] - a[1]) });
     var data1 = new google.visualization.DataTable();
@@ -928,7 +928,6 @@ function renderFrontPage() {
     data1.addColumn('number', "Retired TLPs");
     data1.addColumn({type: 'string', role: 'tooltip', 'p': {'html': true}});
     data1.addColumn('number', 'Current TLPs');
-    data1.addColumn({type: 'string', role: 'tooltip'});
 
     data1.addRows(parr);
 



Mime
View raw message