community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1799055 - in /comdev/reporter.apache.org/trunk/site/js: coffee/main.coffee tabs.js
Date Sun, 18 Jun 2017 07:49:50 GMT
Author: humbedooh
Date: Sun Jun 18 07:49:50 2017
New Revision: 1799055

URL: http://svn.apache.org/viewvc?rev=1799055&view=rev
Log:
fix iteration on reporting cycles

Modified:
    comdev/reporter.apache.org/trunk/site/js/coffee/main.coffee
    comdev/reporter.apache.org/trunk/site/js/tabs.js

Modified: comdev/reporter.apache.org/trunk/site/js/coffee/main.coffee
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/js/coffee/main.coffee?rev=1799055&r1=1799054&r2=1799055&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/js/coffee/main.coffee (original)
+++ comdev/reporter.apache.org/trunk/site/js/coffee/main.coffee Sun Jun 18 07:49:50 2017
@@ -87,18 +87,16 @@ setReportDate = (json, x) ->
             break
 
     # Check the months in order, so it does not matter if the data is unordered
-    for x in m
+    for x,y in m
         for i in rm
-            if (m[x] == rm[i])
-                dates.push(getWednesdays(x)[2])
-
+            if (x == i)
+                dates.push(getWednesdays(y)[2])
     # Cannot combine with the code above because that would destroy the order
     ny = today.getFullYear() + 1
-    for x in m
+    for x,y in m
         for i in rm
-            if (m[x] == rm[i])
-                dates.push(getWednesdays(x, ny)[2])
-
+            if (x == i)
+                dates.push(getWednesdays(y, ny)[2])
     nextdate = dates[0];
     while (nextdate < today)
         nextdate = dates.shift()

Modified: comdev/reporter.apache.org/trunk/site/js/tabs.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/js/tabs.js?rev=1799055&r1=1799054&r2=1799055&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/js/tabs.js (original)
+++ comdev/reporter.apache.org/trunk/site/js/tabs.js Sun Jun 18 07:49:50 2017
@@ -177,7 +177,7 @@ formatRm = function(array) {
 };
 
 setReportDate = function(json, x) {
-  var dates, fullname, i, j, l, len1, len2, len3, len4, len5, link, nextdate, ny, o, pmc,
q, r, ref, ref1, reportdate, rm, sm, today;
+  var dates, fullname, i, j, l, len1, len2, len3, len4, len5, link, nextdate, ny, o, pmc,
q, r, ref, ref1, reportdate, rm, sm, today, y;
   pmc = x[0];
   reportdate = x[1];
   fullname = (x[2] || "Unknown").replace(/Apache /, "");
@@ -195,22 +195,22 @@ setReportDate = function(json, x) {
       break;
     }
   }
-  for (l = 0, len2 = m.length; l < len2; l++) {
-    x = m[l];
+  for (y = l = 0, len2 = m.length; l < len2; y = ++l) {
+    x = m[y];
     for (o = 0, len3 = rm.length; o < len3; o++) {
       i = rm[o];
-      if (m[x] === rm[i]) {
-        dates.push(getWednesdays(x)[2]);
+      if (x === i) {
+        dates.push(getWednesdays(y)[2]);
       }
     }
   }
   ny = today.getFullYear() + 1;
-  for (q = 0, len4 = m.length; q < len4; q++) {
-    x = m[q];
+  for (y = q = 0, len4 = m.length; q < len4; y = ++q) {
+    x = m[y];
     for (r = 0, len5 = rm.length; r < len5; r++) {
       i = rm[r];
-      if (m[x] === rm[i]) {
-        dates.push(getWednesdays(x, ny)[2]);
+      if (x === i) {
+        dates.push(getWednesdays(y, ny)[2]);
       }
     }
   }



Mime
View raw message