community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1871642 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/reportdate.js wizard-beta.js
Date Mon, 16 Dec 2019 10:19:10 GMT
Author: humbedooh
Date: Mon Dec 16 10:19:10 2019
New Revision: 1871642

URL: http://svn.apache.org/viewvc?rev=1871642&view=rev
Log:
redden if juuust about due (or overdue!)

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.js

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js?rev=1871642&r1=1871641&r2=1871642&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js Mon Dec 16 10:19:10
2019
@@ -95,6 +95,10 @@ function getReportDate(json, pmc, dateOn
 		// agenda date or due date?
 		if (dateOnly == "due") {
 			nextdate.setDate(nextdate.getDate() - 2); // Due 48 hours prior to board meeting.
+			let rightnow = new Date();
+			if (nextdate && math.abs(rightnow - nextdate) < (86400*2*1000)) {
+				return new HTML('span', {style: { color: '#711'}}, nextdate.toDateString() + " ("  +
moment(nextdate).fromNow() + ")");
+			}
 			return nextdate ? (nextdate.toDateString() + " ("  + moment(nextdate).fromNow() + ")"):
"Unknown(?)";
 		} else {
 			return nextdate ? (nextdate.toDateString() + " ("  + moment(nextdate).fromNow() + ")"):
"Unknown(?)";

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.js?rev=1871642&r1=1871641&r2=1871642&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard-beta.js Mon Dec 16 10:19:10 2019
@@ -1994,6 +1994,10 @@ function getReportDate(json, pmc, dateOn
 		// agenda date or due date?
 		if (dateOnly == "due") {
 			nextdate.setDate(nextdate.getDate() - 2); // Due 48 hours prior to board meeting.
+			let rightnow = new Date();
+			if (nextdate && math.abs(rightnow - nextdate) < (86400*2*1000)) {
+				return new HTML('span', {style: { color: '#711'}}, nextdate.toDateString() + " ("  +
moment(nextdate).fromNow() + ")");
+			}
 			return nextdate ? (nextdate.toDateString() + " ("  + moment(nextdate).fromNow() + ")"):
"Unknown(?)";
 		} else {
 			return nextdate ? (nextdate.toDateString() + " ("  + moment(nextdate).fromNow() + ")"):
"Unknown(?)";



Mime
View raw message