extracted methods
This commit is contained in:
@ -241,18 +241,9 @@ $(function() {
|
|||||||
$(document).on('click', '#results a', showOutput);
|
$(document).on('click', '#results a', showOutput);
|
||||||
$(document).on('keypress', handleKeyPress);
|
$(document).on('keypress', handleKeyPress);
|
||||||
$('a[data-toggle="tab"]').on('show.bs.tab', storeTab);
|
$('a[data-toggle="tab"]').on('show.bs.tab', storeTab);
|
||||||
$('#assess').on('click', scoreCode);
|
initializeFileTreeButtons();
|
||||||
$('#create-file').on('click', showFileDialog);
|
initializeWorkflowButtons();
|
||||||
$('#destroy-file').on('click', confirmDestroy);
|
initializeWorkspaceButtons();
|
||||||
$('#download').on('click', downloadCode);
|
|
||||||
$('#dropdown-render, #render').on('click', renderCode);
|
|
||||||
$('#dropdown-run, #run').on('click', runCode);
|
|
||||||
$('#dropdown-stop, #stop').on('click', stopCode);
|
|
||||||
$('#dropdown-test, #test').on('click', testCode);
|
|
||||||
$('#save').on('click', saveCode);
|
|
||||||
$('#start').on('click', showWorkspaceTab);
|
|
||||||
$('#start-over').on('click', confirmReset);
|
|
||||||
$('#submit').on('click', confirmSubmission);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var initializeFileTree = function() {
|
var initializeFileTree = function() {
|
||||||
@ -268,10 +259,31 @@ $(function() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var initializeFileTreeButtons = function() {
|
||||||
|
$('#create-file').on('click', showFileDialog);
|
||||||
|
$('#destroy-file').on('click', confirmDestroy);
|
||||||
|
$('#download').on('click', downloadCode);
|
||||||
|
};
|
||||||
|
|
||||||
var initializeTooltips = function() {
|
var initializeTooltips = function() {
|
||||||
$('[data-tooltip]').tooltip();
|
$('[data-tooltip]').tooltip();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var initializeWorkflowButtons = function() {
|
||||||
|
$('#start').on('click', showWorkspaceTab);
|
||||||
|
$('#submit').on('click', confirmSubmission);
|
||||||
|
};
|
||||||
|
|
||||||
|
var initializeWorkspaceButtons = function() {
|
||||||
|
$('#assess').on('click', scoreCode);
|
||||||
|
$('#dropdown-render, #render').on('click', renderCode);
|
||||||
|
$('#dropdown-run, #run').on('click', runCode);
|
||||||
|
$('#dropdown-stop, #stop').on('click', stopCode);
|
||||||
|
$('#dropdown-test, #test').on('click', testCode);
|
||||||
|
$('#save').on('click', saveCode);
|
||||||
|
$('#start-over').on('click', confirmReset);
|
||||||
|
};
|
||||||
|
|
||||||
var populatePanel = function(panel, result, index) {
|
var populatePanel = function(panel, result, index) {
|
||||||
panel.removeClass('panel-default').addClass(getPanelClass(result));
|
panel.removeClass('panel-default').addClass(getPanelClass(result));
|
||||||
panel.find('.panel-title .filename').text(result.filename);
|
panel.find('.panel-title .filename').text(result.filename);
|
||||||
|
Reference in New Issue
Block a user