You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@community.apache.org by se...@apache.org on 2016/08/21 20:23:34 UTC
svn commit: r1757081 - /comdev/projects.apache.org/site/js/projects.js
Author: sebb
Date: Sun Aug 21 20:23:33 2016
New Revision: 1757081
URL: http://svn.apache.org/viewvc?rev=1757081&view=rev
Log:
Where a podling has a DOAP, that takes precedence over the podling.json data
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=1757081&r1=1757080&r2=1757081&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Sun Aug 21 20:23:33 2016
@@ -592,7 +592,7 @@ function renderCommitteePage(committeeId
ul = document.createElement('ul');
var phtml = [];
- for (p in subprojects) {
+ for (p in subprojects.sort()) {
p = subprojects[p];
appendLiInnerHTML(ul, projectLink(p));
}
@@ -1522,8 +1522,15 @@ function fixProjectName(project) {
// Add content by id to projects
function weaveInProjects(json) {
+ var pfx = "incubator-"
for (p in json) {
- projects[p] = fixProjectName(json[p]);
+ // podlings are stored without the prefix, so we strip it from the podling DOAPs
+ // Since podlings are loaded first, DOAPs take precedence
+ if (p.startsWith(pfx)) {
+ projects[p.substring(pfx.length)] = fixProjectName(json[p]);
+ } else {
+ projects[p] = fixProjectName(json[p]);
+ }
}
}
@@ -1614,8 +1621,8 @@ function preloadEverything(callback) {
["json/foundation/committees.json", "committees", setCommittees],
["json/foundation/groups.json", "groups", function(json) { unixgroups = json; }],
["json/foundation/people_name.json", "people", function(json) { people = json; }],
- ["json/foundation/projects.json", "projects", weaveInProjects],
- ["json/foundation/podlings.json", "podlings", weaveInProjects],
+ ["json/foundation/podlings.json", "podlings", weaveInProjects], // do this first
+ ["json/foundation/projects.json", "projects", weaveInProjects], // so can replace with DOAP data where it exists
["json/foundation/committees-retired.json", "retired committees", weaveInRetiredCommittees],
["json/foundation/podlings-history.json", "podlings history", function(json) { podlingsHistory = json; }]
],