fix for broken navigation to binary workspace files

This commit is contained in:
Hauke Klement
2015-03-03 16:16:39 +01:00
parent 947371c4b4
commit 0cece1d07f
2 changed files with 11 additions and 10 deletions

View File

@ -252,7 +252,7 @@ $(function() {
filename: $(this).text(), filename: $(this).text(),
id: parseInt($(this).attr('id')) id: parseInt($(this).attr('id'))
}; };
var frame = $('.editor[data-file-id="' + active_file.id + '"]').parent(); var frame = $('[data-file-id="' + active_file.id + '"]').parent();
showFrame(frame); showFrame(frame);
toggleButtonStates(); toggleButtonStates();
}); });

View File

@ -1,13 +1,14 @@
.frame data-executable=file.file_type.executable? data-filename=file.name_with_extension data-renderable=file.file_type.renderable? data-role=file.role .frame data-executable=file.file_type.executable? data-filename=file.name_with_extension data-renderable=file.file_type.renderable? data-role=file.role
- if file.file_type.binary? - if file.file_type.binary?
- if file.file_type.renderable? .binary-file data-file-id=file.ancestor_id
- if file.file_type.audio? - if file.file_type.renderable?
= audio_tag(file.native_file.url, controls: true) - if file.file_type.audio?
- elsif file.file_type.image? = audio_tag(file.native_file.url, controls: true)
= image_tag(file.native_file.url) - elsif file.file_type.image?
- elsif file.file_type.video? = image_tag(file.native_file.url)
= video_tag(file.native_file.url, controls: true) - elsif file.file_type.video?
- else = video_tag(file.native_file.url, controls: true)
= link_to(file.native_file.file.name_with_extension, file.native_file.url) - else
= link_to(file.native_file.file.name_with_extension, file.native_file.url)
- else - else
.editor data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-read-only=file.read_only = file.content .editor data-file-id=file.ancestor_id data-indent-size=file.file_type.indent_size data-mode=file.file_type.editor_mode data-read-only=file.read_only = file.content