Upgrade font-awesome and add option reset only active file

This commit is contained in:
Sebastian Serth
2020-01-29 10:55:15 +01:00
parent 286f0b9d3c
commit d0eceac440
9 changed files with 787 additions and 655 deletions

View File

@ -102,7 +102,7 @@ CodeOceanEditorSubmissions = {
});
},
resetCode: function() {
resetCode: function(onlyActiveFile = false) {
this.showSpinner(this);
this.ajax({
method: 'GET',
@ -114,7 +114,7 @@ CodeOceanEditorSubmissions = {
var file = _.find(response.files, function(file) {
return file.id === file_id;
});
if(file){
if(file && !onlyActiveFile || file && file.id === CodeOceanEditor.active_file.id){
editor.setValue(file.content);
}
}.bind(this));