aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2015-03-31 02:28:36 +0000
committerSean Whitton <spwhitton@spwhitton.name>2015-03-31 02:30:01 +0000
commit4c9044212435ae1bc4e70292784e195e7eb4762a (patch)
tree49200dc97821a24819c7315e1040697f5405f3b7
parent89ee56917dfc8ed45d5a9450b827bf4a5aa15dcf (diff)
downloadsariulclocks-4c9044212435ae1bc4e70292784e195e7eb4762a.tar.gz
fix bug: time wasting clock not fully restored
When the value of the time wasting clock was restored from the browser's local storage, the hidden form field in the end of class form was left with a value of zero. So if the lesson ends after a browser restart with no further time wasted, the time on the clock was not submitted.
-rw-r--r--assets/js/main.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/assets/js/main.js b/assets/js/main.js
index f0c1941..072f6bd 100644
--- a/assets/js/main.js
+++ b/assets/js/main.js
@@ -291,6 +291,7 @@ var timeWastingClock = MyFlipClock($('#time-wasting-clock'), {
}
});
timeWastingClock.setTime($.jStorage.get("time_wasted", 0));
+$("#class_time_wasted").val($.jStorage.get("time_wasted", 0));
timeWastingClock.running = false;
timeWastingClock.reset = $.proxy(function () {