Pre View configurating

This commit is contained in:
Nathan Leniz
2015-01-20 02:19:39 -05:00
parent cc3fa8e5f7
commit bb87cc4bb3
3 changed files with 5 additions and 8 deletions

View File

@ -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() {

View File

@ -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();
}