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-09 19:26:38 +00:00
parent 424121032f
commit cedf0c7cdf

View File

@ -370,7 +370,7 @@ app.classes.infolog = AppJS.extend(
if (completed != (status.value == 'done' || status.value == 'billed') ||
(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;