From bb87cc4bb3ecce9e30aca214811718a63f34282b Mon Sep 17 00:00:00 2001 From: Nathan Leniz Date: Tue, 20 Jan 2015 02:19:39 -0500 Subject: [PATCH] Pre View configurating --- public/js/lib/bonfire/bonfire.js | 7 +------ public/js/lib/bonfire/{plugin.js => plugin_v0.1.1.js} | 0 views/bonfire/bonfire.jade | 6 ++++-- 3 files changed, 5 insertions(+), 8 deletions(-) rename public/js/lib/bonfire/{plugin.js => plugin_v0.1.1.js} (100%) diff --git a/public/js/lib/bonfire/bonfire.js b/public/js/lib/bonfire/bonfire.js index 54d7965864..c5eefd75ff 100644 --- a/public/js/lib/bonfire/bonfire.js +++ b/public/js/lib/bonfire/bonfire.js @@ -45,11 +45,6 @@ var api = { } else { print('output', data.output); } - }, - console: { - log: function(msg) { - console.log(msg); - } } }; @@ -69,7 +64,7 @@ var requests; // (re)initializes the plugin var reset = function() { requests = 0; - plugin = new jailed.Plugin(path+'plugin.js', api); + plugin = new jailed.Plugin(path+'plugin_v0.1.1.js', api); plugin.whenDisconnected( function() { // give some time to handle the last responce setTimeout( function() { diff --git a/public/js/lib/bonfire/plugin.js b/public/js/lib/bonfire/plugin_v0.1.1.js similarity index 100% rename from public/js/lib/bonfire/plugin.js rename to public/js/lib/bonfire/plugin_v0.1.1.js diff --git a/views/bonfire/bonfire.jade b/views/bonfire/bonfire.jade index 47605cc9ff..1a2d02f54d 100644 --- a/views/bonfire/bonfire.jade +++ b/views/bonfire/bonfire.jade @@ -76,6 +76,7 @@ block content '}\n\n' + 'test();'); myCodeMirror.setSize("100%", 500); + var codeOutput = CodeMirror.fromTextArea(document.getElementById("codeOutput"), { lineNumbers: false, mode: "text", @@ -196,8 +197,9 @@ block content var output; $('#testInputs').find('input').each(function () { if ($(this).val() != null && $(this).val().length !== 0) { + inputs.push($(this).val()); } else { - var keepGoing = prompt("You have submitted a test with empty input. Enter yes to continue."); + //var keepGoing = prompt("You have submitted a test with empty input. Enter yes to continue."); if (/yes/.test(keepGoing.toLowerCase())) { inputs.push($(this).val()); } else { @@ -221,7 +223,7 @@ block content .addClass("glyphicon glyphicon-remove-sign") .css("float", "right") .click(function () { - var input = prompt("This will remove the test permanently.\n If you want to do this, type delete"); + //var input = prompt("This will remove the test permanently.\n If you want to do this, type delete"); if (/delete/.test(input.toLowerCase())) { $(this).parent().remove(); }