Merge remote-tracking branch 'origin/master' into error-info

This commit is contained in:
Maximilian Grundke
2017-08-23 14:51:53 +02:00
14 changed files with 176 additions and 17 deletions

View File

@@ -155,9 +155,9 @@ configureEditors: function () {
if (!same) {
this.publishCodeOceanEvent("codeocean_editor_paste", {
text: pasteObject.text,
codeocean_user_id: $('#editor').data('user-id'),
exercise: $('#editor').data('exercise-id'),
file_id: "1"
});
}
},
@@ -390,9 +390,7 @@ configureEditors: function () {
var payload = {
user: {
type: 'User',
uuid: $('#editor').data('user-id'),
external_id: $('#editor').data('user-external-id')
uuid: $('#editor').data('user-external-id')
},
verb: {
type: eventName

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
this.toggleButtonStates();
this.updateSaveStateLabel();
},
/**
@@ -200,12 +202,15 @@ CodeOceanEditorSubmissions = {
}
},
autosave: function () {
updateSaveStateLabel: function() {
var date = new Date();
var autosaveLabel = $(this.autosaveLabel);
autosaveLabel.parent().css("visibility", "visible");
autosaveLabel.text(date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds());
autosaveLabel.text(date.toLocaleTimeString());
},
autosave: function () {
this.autosaveTimer = null;
this.createSubmission($('#autosave'), null);
}