diff --git a/app/assets/javascripts/editor/codepilot.js.erb b/app/assets/javascripts/editor/codepilot.js.erb deleted file mode 100644 index aa1513be..00000000 --- a/app/assets/javascripts/editor/codepilot.js.erb +++ /dev/null @@ -1,24 +0,0 @@ -CodeOceanEditorCodePilot = { - qa_api: undefined, - QaApiOutputBuffer: {'stdout': '', 'stderr': ''}, - - initializeCodePilot: function () { - if ($('#questions-column').isPresent() && (typeof QaApi != 'undefined') && QaApi.isBrowserSupported()) { - $('#editor-column').addClass('col-md-10').removeClass('col-md-12'); - $('#questions-column').addClass('col-md-2'); - - var node = document.getElementById('questions-holder'); - var url = $('#questions-holder').data('url'); - - this.qa_api = new QaApi(node, url); - } - }, - - handleQaApiOutput: function () { - if (this.qa_api) { - this.qa_api.executeCommand('syncOutput', [[this.QaApiOutputBuffer]]); - // reset the object - } - this.QaApiOutputBuffer = {'stdout': '', 'stderr': ''}; - } -}; \ No newline at end of file diff --git a/app/assets/javascripts/editor/flowr.js.erb b/app/assets/javascripts/editor/flowr.js.erb deleted file mode 100644 index 4dc0de45..00000000 --- a/app/assets/javascripts/editor/flowr.js.erb +++ /dev/null @@ -1,35 +0,0 @@ -CodeOceanEditorFlowr = { - isFlowrEnabled: true, - flowrResultHtml: '
', - - handleStderrOutputForFlowr: function () { - if (!this.isFlowrEnabled) return; - - var flowrUrl = $('#flowrHint').data('url'); - var flowrHintBody = $('#flowrHint .panel-body'); - var queryParameters = { - query: this.flowrOutputBuffer - }; - - flowrHintBody.empty(); - - jQuery.getJSON(flowrUrl, queryParameters, function (data) { - jQuery.each(data.queryResults, function (index, question) { - var collapsibleTileHtml = this.flowrResultHtml.replace(/{{collapseId}}/g, 'collapse-' + question).replace(/{{headingId}}/g, 'heading-' + question); - var resultTile = $(collapsibleTileHtml); - - resultTile.find('h4 > a').text(question.title + ' | Found via ' + question.source); - resultTile.find('.panel-body').html(question.body); - resultTile.find('.panel-body').append('Open this question'); - - flowrHintBody.append(resultTile); - }); - - if (data.queryResults.length !== 0) { - $('#flowrHint').fadeIn(); - } - }); - - this.flowrOutputBuffer = ''; - } -}; \ No newline at end of file