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 () { initializeFileTree: function () {
$('#files').jstree($('#files').data('entries')); $('#files').jstree($('#files').data('entries'));
$('#files').on('click', 'li.jstree-leaf', function () { $('#files').on('click', 'li.jstree-leaf', function (event) {
active_file = { active_file = {
filename: $(this).text(), filename: $(event.target).parent().text(),
id: parseInt($(this).attr('id')) id: parseInt($(event.target).parent().attr('id'))
}; };
var frame = $('[data-file-id="' + active_file.id + '"]').parent(); var frame = $('[data-file-id="' + active_file.id + '"]').parent();
this.showFrame(frame); this.showFrame(frame);