community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1681605 - /comdev/projects.apache.org/site/js/projects.js
Date Mon, 25 May 2015 16:14:06 GMT
Author: hboutemy
Date: Mon May 25 16:14:06 2015
New Revision: 1681605

URL: http://svn.apache.org/r1681605
Log:
fix attic and incubator projects names when weaving

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=1681605&r1=1681604&r2=1681605&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Mon May 25 16:14:06 2015
@@ -314,9 +314,9 @@ function renderProjectPage(project, proj
     if (isIncubating) {
         pt = "Incubating";
     } else if (project && !committeesByName[project.name] && committees[project.pmc])
{
-	    pt = (project.pmc == "attic") ? "in the Attic" : ""
+        pt = (project.pmc == "attic") ? "in the Attic" : ""
     } else {
-	    isCommittee = true
+        isCommittee = true
     }
     var name = (project && project.name) ? project.name : committee.name;
     if (!name.match(/incubating/i) && pt != "") {
@@ -545,13 +545,7 @@ function projectLink(id) {
         // not project id: perhaps committee id
         project = committees[id];
     }
-    var name = project.name;
-    if (project.pmc == "attic") {
-        name += " (in the Attic)";
-    } else if ((project.pmc == "incubator") && !name.match(/incubating/i)) {
-        name += " (Incubating)";
-    }
-    return "<a href='project.html?" + id + "'>" + name + "</a>";
+    return "<a href='project.html?" + id + "'>" + project.name + "</a>";
 }
 
 function isMember(id) {
@@ -745,10 +739,6 @@ function renderProjectsByPMC() {
     }
     for (project in projects) {
         project = projects[project];
-        // Fix Incubating projects
-        if (project.name.match("incubating", "i")) {
-            project.pmc = 'incubator'
-        }
         if (committees[project.pmc]) {
             dcount[project.pmc]++;
         }
@@ -768,10 +758,6 @@ function renderProjectsByPMC() {
             for (i in projectsSorted) {
                 i = projectsSorted[i];
                 var project = projects[i];
-                // Fix Incubating projects
-                if (project.name.match("incubating", "i")) {
-                    project.pmc = 'incubator'
-                }
                 if (committees[project.pmc]) {
                     xlpmc = project.pmc;
                     if (xlpmc == lpmc) {
@@ -1363,7 +1349,14 @@ function weaveById(list,mapById) {
 // Add content by id to projects
 function weaveInProjects(json) {
     for (p in json) {
-        projects[p] = json[p];
+        var project = json[p];
+        // fix attic and incubator project names if necessary
+        if (project.pmc == "attic") {
+            project.name += " (in the Attic)";
+        } else if ((project.pmc == "incubator") && !project.name.match(/incubating/i))
{
+            project.name += " (Incubating)";
+        }
+        projects[p] = project;
     }
 }
 



Mime
View raw message