moved method
This commit is contained in:
@ -212,6 +212,30 @@ $(function() {
|
||||
showTab(3);
|
||||
};
|
||||
|
||||
var handleStderrOutputForFlowr = function(event) {
|
||||
var flowrUrl = $('#flowrHint').data('url');
|
||||
var json = JSON.parse(event.data);
|
||||
var stderrOutput = '';
|
||||
|
||||
if (json.stderr) {
|
||||
stderrOutput += json.stderr;
|
||||
} else if (json.code) {
|
||||
var flowrHintBody = $('#flowrHint .panel-body');
|
||||
|
||||
$.getJSON(flowrUrl + '&query=' + escape(stderrOutput), function(data) {
|
||||
_.each(_.compact(data.queryResults), function(question, index) {
|
||||
var collapsibleTileHtml = flowrResultHtml.replace(/{{collapseId}}/g, 'collapse-' + index).replace(/{{headingId}}/g, 'heading-' + index);
|
||||
var resultTile = $(collapsibleTileHtml);
|
||||
resultTile.find('h4 > a').text(question.title);
|
||||
resultTile.find('.panel-body').append(question.body);
|
||||
flowrHintBody.append(resultTile);
|
||||
});
|
||||
|
||||
$('#flowrHint').fadeIn();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var handleTestResponse = function(response) {
|
||||
clearOutput();
|
||||
printOutput(response[0], false, 0);
|
||||
@ -616,28 +640,4 @@ $(function() {
|
||||
showFirstFile();
|
||||
showRequestedTab();
|
||||
}
|
||||
|
||||
var handleStderrOutputForFlowr = function(event) {
|
||||
var flowrUrl = $('#flowrHint').data('url');
|
||||
var json = JSON.parse(event.data);
|
||||
var stderrOutput = '';
|
||||
|
||||
if (json.stderr) {
|
||||
stderrOutput += json.stderr;
|
||||
} else if (json.code) {
|
||||
var flowrHintBody = $('#flowrHint .panel-body');
|
||||
|
||||
$.getJSON(flowrUrl + '&query=' + escape(stderrOutput), function(data) {
|
||||
_.each(_.compact(data.queryResults), function(question, index) {
|
||||
var collapsibleTileHtml = flowrResultHtml.replace(/{{collapseId}}/g, 'collapse-' + index).replace(/{{headingId}}/g, 'heading-' + index);
|
||||
var resultTile = $(collapsibleTileHtml);
|
||||
resultTile.find('h4 > a').text(question.title);
|
||||
resultTile.find('.panel-body').append(question.body);
|
||||
flowrHintBody.append(resultTile);
|
||||
});
|
||||
|
||||
$('#flowrHint').fadeIn();
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user