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);
}

View File

@@ -17,3 +17,50 @@
width: 100%;
height: 200px;
}
.ace_tooltip {
display: none !important;
}
p.comment {
width: 400px;
}
.popover-header {
width: 100%;
overflow: hidden;
padding-bottom: 10px;
margin: auto;
}
.popover-username {
font-weight: bold;
width: 60%;
float: left;
}
.popover-date {
text-align: right;
color: #008cba;
margin-left: 60%;
font-size: x-small;
}
.popover-updated {
text-align: right;
margin-left: 60%;
font-size: x-small;
}
.popover-comment {
word-wrap: break-word;
margin-bottom: 10px;
}
.popover-divider {
width: 100%;
height: 1px;
background-color: #008cba;
overflow: hidden;
margin-bottom: 10px;
}