Make sure status has a 'not-started' value before we switch to it, prevents infologs disappearing if you change status back to 0%

This commit is contained in:
Nathan Gray 2015-03-04 16:13:47 +00:00
parent 5f3e81c472
commit 345ec3c652

View File

@ -370,7 +370,7 @@ app.classes.infolog = AppJS.extend(
if (completed != (status.value == 'done' || status.value == 'billed') || if (completed != (status.value == 'done' || status.value == 'billed') ||
(status.value == 'not-started') != (percent.value == 0)) (status.value == 'not-started') != (percent.value == 0))
{ {
status.value = percent.value == 0 ? 'not-started' : (percent.value == 100 ? 'done' : 'ongoing'); status.value = percent.value == 0 ? ($j('[value="not-started"]',status).length ? 'not-started':'ongoing') : (percent.value == 100 ? 'done' : 'ongoing');
} }
break; break;