removed code that autoset end date to tomorrow which was not inline with the zero duration default
This commit is contained in:
parent
349ce4720d
commit
1c97f114eb
1 changed files with 9 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue