community-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=1871649&view=rev
Log:
harmonize with board report templates

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/reportdate.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard.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=1871649&r1=1871648&r2=1871649&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:57:21
2019
@@ -94,12 +94,10 @@ function getReportDate(json, pmc, dateOn
 	if (dateOnly) {
 		// agenda date or due date?
 		if (dateOnly == "due") {
-			nextdate.setDate(nextdate.getDate() - 2); // Due 48 hours prior to board meeting.
+			nextdate.setDate(nextdate.getDate() - 7); // Due one week prior to meeting.
 			let rightnow = new Date();
-			if (nextdate && Math.abs(rightnow - nextdate) < (86400*2*1000)) {
-				let fromnow = moment(nextdate).fromNow();
-				if (nextdate && Math.abs(rightnow - nextdate) < (86400*1000)) fromnow = "TODAY";
-				return new HTML('span', {style: { color: '#711'}}, nextdate.toDateString() + " ("  +
fromnow + ")");
+			if (nextdate < rightnow) {
+				return new HTML('span', {style: { color: '#711'}}, nextdate.toDateString() + " (Report
is due)");
 			}
 			return nextdate ? (nextdate.toDateString() + " ("  + moment(nextdate).fromNow() + ")"):
"Unknown(?)";
 		} else {

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



Mime
View raw message