diff --git a/public/css/main.less b/public/css/main.less index a108bfbf9f..5288731732 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -176,8 +176,8 @@ ul { font-size: 26px; } -.ten-pixel-break { - height: 10px; +.five-pixel-break { + height: 5px; } .fifteen-pixel-break { @@ -201,12 +201,12 @@ ul { .responsive-container { position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden; } .responsive-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } -.positive-5 { - margin-top: 5px; +.positive-10 { + margin-top: 10px; } -.positive-10 { - padding-top: 10px; +.positive-15-bottom { + margin-bottom: 15px; } .positive-15 { @@ -251,6 +251,10 @@ ul { margin-top: -20px; } +.negative-bottom-margin-30 { + margin-bottom: -30px; +} + .large-p { font-size: 18px; } diff --git a/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js b/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js index fdb9c84ed8..2940b20b15 100644 --- a/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js +++ b/public/js/lib/coursewares/coursewaresHCJQFramework_0.1.9.js @@ -90,7 +90,7 @@ var testResults = []; var postSuccess = function(data) { var testDoc = document.createElement("div"); $(testDoc) - .html("
" + JSON.parse(data) + "
"); + .html("
" + JSON.parse(data) + "
"); $('#testSuite').append(testDoc); testSuccess(); }; @@ -98,7 +98,7 @@ var postSuccess = function(data) { var postError = function(data) { var testDoc = document.createElement("div"); $(testDoc) - .html("
" + JSON.parse(data) + "
"); + .html("
" + JSON.parse(data) + "
"); $('#testSuite').append(testDoc); }; var goodTests = 0; diff --git a/public/js/lib/coursewares/iFrameScripts_0.0.4.js b/public/js/lib/coursewares/iFrameScripts_0.0.4.js index 7691582f4a..1d5db5413d 100644 --- a/public/js/lib/coursewares/iFrameScripts_0.0.4.js +++ b/public/js/lib/coursewares/iFrameScripts_0.0.4.js @@ -3,18 +3,21 @@ var tests = parent.tests; var editor = parent.editorValueForIFrame; - for (var i = 0; i < tests.length; i++) { - var thisTest = true; - try { - eval(parent.tests[i]); - } catch (err) { - allTestsGood = false; - thisTest = false; - parent.postError(JSON.stringify(err.message.split(':').shift())); - } finally { - if (thisTest) { - parent.postSuccess(JSON.stringify(tests[i].split(',').pop().replace(/\'/g, '').replace(/\)/, ''))); + setTimeout(function() { + for (var i = 0; i < tests.length; i++) { + var thisTest = true; + try { + eval(parent.tests[i]); + } catch (err) { + allTestsGood = false; + thisTest = false; + parent.postError(JSON.stringify(err.message.split(':').shift())); + } finally { + if (thisTest) { + parent.postSuccess(JSON.stringify(tests[i].split(',').pop().replace( + /\'/g, '').replace(/\)/, ''))); + } } } - } + }, 10); })(); diff --git a/seed/challenges/basic-bonfires.json b/seed/challenges/basic-bonfires.json index a6cf5aebf4..df4b6bc16c 100644 --- a/seed/challenges/basic-bonfires.json +++ b/seed/challenges/basic-bonfires.json @@ -46,9 +46,8 @@ "dashedName": "bonfire-meet-bonfire", "difficulty": "0", "description": [ - "Click the button below for further instructions.", "Your goal is to fix the failing test.", - "First, run all the tests by clicking \"Run code\" or by pressing Control + Enter", + "First, run all the tests by clicking \"Run code\" or by pressing Control + Enter.", "The failing test is in red. Fix the code so that all tests pass. Then you can move on to the next Bonfire.", "Make this function return true no matter what." ], diff --git a/seed/future-jquery-ajax-json.json b/seed/future-jquery-ajax-json.json index 97d0504f04..2a3a5d9cd7 100644 --- a/seed/future-jquery-ajax-json.json +++ b/seed/future-jquery-ajax-json.json @@ -1,73 +1,231 @@ { "name": "jQuery, Ajax and JSON", - "order" : 0.004, - "challenges": [ - { + "order": 0.004, + "challenges": [{ "id": "bad87fee1348bd9acdd08826", "name": "Waypoint: Learn how Script Tags and Document Ready Work", "difficulty": 0.072, "description": [ - "Test" + "We've simplified our Cat Photo App and removed our style element. Add a script element to your page and create a $(document).ready function within it.", + "Add $(document).ready(function() { to your script element, and then close it on the following line with });." ], "tests": [ - "assert(typeof $('#target').attr('disabled') === 'undefined', 'Change the disabled attribute of the \"target\" button to false');", - "expect($('#target')).to.exist()" + "assert(editor.match(/