community-commits mailing list archives

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

URL: http://svn.apache.org/r1654164
Log:
if mailing list entry is an email address, prepend mailto:

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=1654164&r1=1654163&r2=1654164&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Fri Jan 23 10:16:49 2015
@@ -418,7 +418,12 @@ function renderProjectPage(json, state)
 	if (json['mailing-list']) {
 	    var li = document.createElement('li');
 	    bd = json['mailing-list']
-	    li.innerHTML = "<b>Mailing list(s):</b> <a href='" + bd + "'>" + bd
+ "</a>"
+	    xbd = bd
+	    // email instead of link?
+	    if (bd.match(/@/)) {
+		xbd = "mailto:" + bd
+	    }
+	    li.innerHTML = "<b>Mailing list(s):</b> <a href='" + xbd + "'>" +
bd + "</a>"
 	    ul.appendChild(li)
 	}
 	



Mime
View raw message