minor improvement

This commit is contained in:
Hauke Klement
2015-03-14 12:23:14 +01:00
parent 0b73180832
commit 4a14e93d2c

View File

@ -481,14 +481,8 @@ $(function() {
});
};
var showFrame = function(frame) {
active_frame = frame;
$('.frame').hide();
frame.show();
};
var showMainFile = function() {
var frame = $('.frame[data-role="main_file"]');
var showFirstFile = function() {
var frame = $('.frame[data-role="main_file"]').isPresent() ? $('.frame[data-role="main_file"]') : $('.frame').first();
var file_id = frame.find('.editor').data('file-id');
active_file = {
filename: frame.data('filename'),
@ -499,6 +493,12 @@ $(function() {
toggleButtonStates();
};
var showFrame = function(frame) {
active_frame = frame;
$('.frame').hide();
frame.show();
};
var showOutput = function(event) {
event.preventDefault();
showTab(2);
@ -613,7 +613,7 @@ $(function() {
initializeFileTree();
initializeTooltips();
renderScore();
showMainFile();
showFirstFile();
showRequestedTab();
}