From 1c97f114eb523c7337657a0e7bd0f6cbb1e26d72 Mon Sep 17 00:00:00 2001 From: Frank Dillon Date: Tue, 7 Nov 2006 18:05:38 +0000 Subject: [PATCH] removed code that autoset end date to tomorrow which was not inline with the zero duration default --- www/extras/wobject/ProjectManager/projectDisplay.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/www/extras/wobject/ProjectManager/projectDisplay.js b/www/extras/wobject/ProjectManager/projectDisplay.js index 0017cf532..306daf966 100644 --- a/www/extras/wobject/ProjectManager/projectDisplay.js +++ b/www/extras/wobject/ProjectManager/projectDisplay.js @@ -172,26 +172,32 @@ function getTotalDuration(te) { parseFloatOrNA(te.lagTime.value)); } +//-------------------------------------------------------------------------------------- function maybeDefaultTaskValues(te) { var todayString = intlDate(new Date()); - var tomorrowString = intlDate(datePlusDays(new Date(), 1)); + //var tomorrowString = intlDate(datePlusDays(new Date(), 1)); var timed = isTimed(te); - if (te.duration.value == "") te.duration.value = timed? durationOfFracDays(1) : 0; + //if (te.duration.value == "") te.duration.value = timed? durationOfFracDays(1) : 0; if (te.lagTime.value == "") te.lagTime.value = 0; if (te.start.value == "" && te.end.value == "") { te.start.value = todayString; - te.end.value = tomorrowString; + te.end.value = todayString; } else if (te.start.value == "") { setEndFromStartDate(te); } else if (te.end.value == "") { setStartFromEndDate(te); } + + if(timed && te.duration.value == 0) { + //TO DO - Calculate duration based on end date + } updateTaskArray(te); } +//-------------------------------------------------------------------------------------- function updateTaskArray(te) { var seqNum = te.seqNum.value; if (seqNum == "") return;