Fix setting active file in editor

The file select hook did construct an active_file but did not
assign it to the actual variables. This commit changes the hook to
use the existing setActiveFile helper function.
This commit is contained in:
Jan Graichen
2018-10-19 12:34:12 +02:00
parent 131f610116
commit 629c925e77

View File

@@ -269,11 +269,11 @@ configureEditors: function () {
initializeFileTree: function () {
$('#files').jstree($('#files').data('entries'));
$('#files').on('click', 'li.jstree-leaf', function (event) {
active_file = {
this.setActiveFile(
filename: $(event.target).parent().text(),
id: parseInt($(event.target).parent().attr('id'))
};
var frame = $('[data-file-id="' + active_file.id + '"]').parent();
);
var frame = $('[data-file-id="' + this.active_file.id + '"]').parent();
this.showFrame(frame);
this.toggleButtonStates();
}.bind(this));