Mercurial > hg > waet-hammond-1
diff core.js @ 6:bd0bd3033ac5
Added check for one of A/B to be selected
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sun, 24 Apr 2016 13:42:43 +0100 |
parents | 5b34e5fed7bb |
children | a6ce34b4dd41 |
line wrap: on
line diff
--- a/core.js Fri Apr 22 02:43:21 2016 +0100 +++ b/core.js Sun Apr 24 13:42:43 2016 +0100 @@ -305,7 +305,7 @@ break; case "AB": - interfaceJS.setAttribute("src","interfaces/AB.js?0"); + interfaceJS.setAttribute("src","interfaces/AB.js?"+Math.random()); // AB comes with a css file var css = document.createElement('link'); @@ -3133,9 +3133,19 @@ str +='.'; alert(str); console.log(str); - this.storeErrorNode(str); + this.storeErrorNode(str); return false; }; + this.checkOneFragmentSelected = function(){ + console.log("checkOneFragmentSelected"); + var str = "You should select an answer before continuing"; + if(this.comparator.selected === null){ + alert(str); + return false; + } else { + return true; + } + }; this.checkAllPlayed = function() { var str = "You have not played ";