From 3d42b09bcab65fd4627b14c724d58aa945c93782 Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Fri, 14 Aug 2015 23:57:43 +0100 Subject: [PATCH 1/2] Added a helper function to main.js for challenge making --- public/css/main.less | 4 ++-- public/js/main_0.0.3.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/public/css/main.less b/public/css/main.less index 60b2d3b0291..bc060791d52 100644 --- a/public/css/main.less +++ b/public/css/main.less @@ -743,8 +743,8 @@ form.code span { } .scroll-locker { - overflow-x: auto; - overflow-y: scroll; + overflow-x: hidden; + overflow-y: auto; } .big-error-icon { diff --git a/public/js/main_0.0.3.js b/public/js/main_0.0.3.js index 61cb831ece3..3bafc6c8c98 100644 --- a/public/js/main_0.0.3.js +++ b/public/js/main_0.0.3.js @@ -359,6 +359,10 @@ $(document).ready(function() { } }); +function defCheck(a){ + if(a !== 'undefined'){return(true);}else{return(false);} +} + var profileValidation = angular.module('profileValidation', ['ui.bootstrap']); profileValidation.controller('profileValidationController', ['$scope', '$http', From 326c22276de0abf0f91d19cd0d9357ff14004aac Mon Sep 17 00:00:00 2001 From: benmcmahon100 Date: Sat, 15 Aug 2015 01:08:33 +0100 Subject: [PATCH 2/2] Added a helper function to main.js for challenge making --- seed/challenges/basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/basic-javascript.json b/seed/challenges/basic-javascript.json index 9babb7d2024..3fdf376a7bb 100644 --- a/seed/challenges/basic-javascript.json +++ b/seed/challenges/basic-javascript.json @@ -1570,7 +1570,7 @@ "difficulty":"9.9901", "description":[ "Now that we can detect when the player wins we are going to add an image to each slot depending on the random values we generate", - "$($('.slot')[0]).html('<img src = \"' + images[slotOne-1] + '\">');" + "$($('.slot')[0]).html('<img src = \"' + images[slotOne-1] + '\">');" ], "tests":[ "assert(editor.match(/\\$\\(\\$\\(\\'\\.slot\\'\\)\\[\\d\\]\\)\\.html\\(\\'\\\\'\\);/gi) && editor.match(/\\$\\(\\$\\(\\'\\.slot\\'\\)\\[\\d\\]\\)\\.html\\(\\'\\\\'\\);/gi).length >= 3, 'Use the provided code three times. One for each slot');",