community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1685316 - /comdev/projects.apache.org/site/js/projects.js
Date Sat, 13 Jun 2015 20:15:02 GMT
Author: hboutemy
Date: Sat Jun 13 20:15:02 2015
New Revision: 1685316

URL: http://svn.apache.org/r1685316
Log:
added implemented standards to project page

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=1685316&r1=1685315&r2=1685316&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Sat Jun 13 20:15:02 2015
@@ -248,10 +248,11 @@ function appendElementWithInnerHTML(obj,
     var child = document.createElement(type);
     child.innerHTML = html;
     obj.appendChild(child);
+    return child;
 }
 
 function appendLiInnerHTML(ul,html) {
-    appendElementWithInnerHTML(ul,'li',html);
+    return appendElementWithInnerHTML(ul,'li',html);
 }
 
 function renderProjectPage(project, projectId) {
@@ -351,6 +352,25 @@ function renderProjectPage(project, proj
         appendLiInnerHTML(ul, "<b>Committers (" + commitgroup.length + "):</b>
<blockquote>" + commitl.join(", &nbsp;") + "</blockqoute>");
     }
 
+    if (project.implements) {
+        var stds = document.createElement('ul');
+        var impl;
+        for (impl in project.implements) {
+            impl = project.implements[impl];
+            var std = "";
+            if (impl.body) {
+                std += impl.body + ' ';
+            }
+            if (impl.id) {
+                std += "<a href='" + impl.url + "'>" + impl.id + "</a>: " + impl.title;
+            } else {
+                std += "<a href='" + impl.url + "'>" + impl.title + "</a>";
+            }
+            appendLiInnerHTML(stds, std);
+        }
+        appendLiInnerHTML(ul, "<b>Implemented standards</b>").appendChild(stds);
+    }
+
     // doap/rdf
     if (project.doap) {
         appendLiInnerHTML(ul, "<b>Project data file:</b> <a href='" + project.doap
+ "' target='_blank'>DOAP RDF Source</a> (<a href='json/projects/" + projectId
+ ".json'>generated json</a>)");



Mime
View raw message