Commit f681d430 by cahrens

More cleanup in base.js.

parent 83eda6ac
...@@ -236,7 +236,7 @@ function getEdxTimeFromDateTimeVals(date_val, time_val, format) { ...@@ -236,7 +236,7 @@ function getEdxTimeFromDateTimeVals(date_val, time_val, format) {
time_val = '00:00'; time_val = '00:00';
// Note, we are using date.js utility which has better parsing abilities than the built in JS date parsing // Note, we are using date.js utility which has better parsing abilities than the built in JS date parsing
date = Date.parse(date_val + " " + time_val); var date = Date.parse(date_val + " " + time_val);
if (format == null) if (format == null)
format = 'yyyy-MM-ddTHH:mm'; format = 'yyyy-MM-ddTHH:mm';
...@@ -254,6 +254,7 @@ function getEdxTimeFromDateTimeInputs(date_id, time_id, format) { ...@@ -254,6 +254,7 @@ function getEdxTimeFromDateTimeInputs(date_id, time_id, format) {
} }
function autosaveInput(e) { function autosaveInput(e) {
var self = this;
if (this.saveTimer) { if (this.saveTimer) {
clearTimeout(this.saveTimer); clearTimeout(this.saveTimer);
} }
...@@ -261,7 +262,7 @@ function autosaveInput(e) { ...@@ -261,7 +262,7 @@ function autosaveInput(e) {
this.saveTimer = setTimeout(function () { this.saveTimer = setTimeout(function () {
$changedInput = $(e.target); $changedInput = $(e.target);
saveSubsection(); saveSubsection();
this.saveTimer = null; self.saveTimer = null;
}, 500); }, 500);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment