From cedf0c7cdfb12228dce322798ab8f5e056a21a26 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 9 Mar 2015 19:26:38 +0000 Subject: [PATCH] Make sure status has a 'not-started' value before we switch to it, prevents infologs disappearing if you change status back to 0% --- infolog/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infolog/js/app.js b/infolog/js/app.js index 0718da9430..d6118a015f 100644 --- a/infolog/js/app.js +++ b/infolog/js/app.js @@ -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;