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:
@@ -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));
|
||||
|
Reference in New Issue
Block a user