Merge remote-tracking branch 'origin/master' into clean-comments

This commit is contained in:
Maximilian Grundke
2017-08-17 15:52:51 +02:00

View File

@ -75,6 +75,8 @@ CodeOceanEditorSubmissions = {
} }
// toggle button states (it might be the case that the request for comments button has to be enabled // toggle button states (it might be the case that the request for comments button has to be enabled
this.toggleButtonStates(); this.toggleButtonStates();
this.updateSaveStateLabel();
}, },
/** /**
@ -200,12 +202,15 @@ CodeOceanEditorSubmissions = {
} }
}, },
autosave: function () { updateSaveStateLabel: function() {
var date = new Date(); var date = new Date();
var autosaveLabel = $(this.autosaveLabel); var autosaveLabel = $(this.autosaveLabel);
autosaveLabel.parent().css("visibility", "visible"); autosaveLabel.parent().css("visibility", "visible");
autosaveLabel.text(date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()); autosaveLabel.text(date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds());
autosaveLabel.text(date.toLocaleTimeString()); autosaveLabel.text(date.toLocaleTimeString());
},
autosave: function () {
this.autosaveTimer = null; this.autosaveTimer = null;
this.createSubmission($('#autosave'), null); this.createSubmission($('#autosave'), null);
} }