Merge branch 'editor-js-refactor' into editor-frontend-refactor

This commit is contained in:
Alexander Kastius
2016-09-01 12:02:47 +02:00

View File

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