Always use full file path for CodeOceanEditor.active_file
This commit is contained in:
@ -366,11 +366,9 @@ var CodeOceanEditor = {
|
|||||||
}
|
}
|
||||||
filesInstance.jstree(filesInstance.data('entries'));
|
filesInstance.jstree(filesInstance.data('entries'));
|
||||||
filesInstance.on('click', 'li.jstree-leaf > a', function (event) {
|
filesInstance.on('click', 'li.jstree-leaf > a', function (event) {
|
||||||
this.setActiveFile(
|
const file_id = parseInt($(event.target).parent().attr('id'));
|
||||||
$(event.target).parent().text(),
|
const frame = $('[data-file-id="' + file_id + '"]').parent();
|
||||||
parseInt($(event.target).parent().attr('id'))
|
this.setActiveFile(frame.data('filename'), file_id);
|
||||||
);
|
|
||||||
var frame = $('[data-file-id="' + this.active_file.id + '"]').parent();
|
|
||||||
this.showFrame(frame);
|
this.showFrame(frame);
|
||||||
this.toggleButtonStates();
|
this.toggleButtonStates();
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
Reference in New Issue
Block a user