From 68962d4d82473952c037aa7c5ab6f13f41ecf126 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Sun, 10 May 2015 22:33:04 -0700 Subject: [PATCH] further improvements to coursewares and bonfires --- public/css/main.less | 2 +- public/js/lib/bonfire/bonfireFramework_v0.1.3.js | 2 +- public/js/lib/coursewares/coursewaresHCJQFramework_0.1.1.js | 4 ++-- public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js | 2 +- public/js/lib/coursewares/iFrameScripts_0.0.1.js | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/public/css/main.less b/public/css/main.less index 7d04cbba7c..8d8986d47f 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -729,7 +729,7 @@ div.CodeMirror-scroll { } .test-vertical-center { - margin-top: 15px; + margin-top: 8px; } .cm-s-monokai.CodeMirror { diff --git a/public/js/lib/bonfire/bonfireFramework_v0.1.3.js b/public/js/lib/bonfire/bonfireFramework_v0.1.3.js index 0e0c5f5005..fb56ced9d0 100644 --- a/public/js/lib/bonfire/bonfireFramework_v0.1.3.js +++ b/public/js/lib/bonfire/bonfireFramework_v0.1.3.js @@ -201,7 +201,7 @@ var createTestDisplay = function() { .prependTo($('#testSuite')) } else { $(testDoc) - .html("
" + test.text + "
") + .html("
" + test.text + "
") .appendTo($('#testSuite')); } }; diff --git a/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.1.js b/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.1.js index 4407a23be2..f91de93e29 100644 --- a/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.1.js +++ b/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.1.js @@ -56,7 +56,7 @@ var allTests = ''; }); })(); -var otherTestsForNow = ""; +var otherTestsForNow = ""; var delay; // Initialize CodeMirror editor with a nice html5 canvas demo. @@ -92,7 +92,7 @@ var postSuccess = function(data) { var postError = function(data) { var testDoc = document.createElement("div"); $(testDoc) - .html("
" + JSON.parse(data) + "
") + .html("
" + JSON.parse(data) + "
") .prependTo($('#testSuite')) }; var goodTests = 0; diff --git a/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js b/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js index c4124e4455..d32e54428e 100644 --- a/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js +++ b/public/js/lib/coursewares/coursewaresJSFramework_0.0.1.js @@ -182,7 +182,7 @@ var createTestDisplay = function() { if (test.err != null) { console.log('Should be displaying bad tests'); $(testDoc) - .html("
" + test.text + "
" + test.err + "
") + .html("
" + test.text + "
" + test.err + "
") .prependTo($('#testSuite')) } else { $(testDoc) diff --git a/public/js/lib/coursewares/iFrameScripts_0.0.1.js b/public/js/lib/coursewares/iFrameScripts_0.0.1.js index efb149c325..5856d50b19 100644 --- a/public/js/lib/coursewares/iFrameScripts_0.0.1.js +++ b/public/js/lib/coursewares/iFrameScripts_0.0.1.js @@ -9,10 +9,10 @@ } catch (err) { allTestsGood = false; thisTest = false; - parent.postError(JSON.stringify(tests[i].message)); + parent.postError(JSON.stringify(err.message.split(':').shift())); } finally { if (thisTest) { - parent.postSuccess(JSON.stringify(tests[i])); + parent.postSuccess(JSON.stringify(tests[i].split(',').pop().replace(/\'/g, '').replace(/\)/, ''))); } } }