Mercurial > hg > waet-hammond-1
comparison 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 |
comparison
equal
deleted
inserted
replaced
5:d537911d9b25 | 6:bd0bd3033ac5 |
---|---|
303 | 303 |
304 document.getElementsByTagName("head")[0].appendChild(css); | 304 document.getElementsByTagName("head")[0].appendChild(css); |
305 break; | 305 break; |
306 | 306 |
307 case "AB": | 307 case "AB": |
308 interfaceJS.setAttribute("src","interfaces/AB.js?0"); | 308 interfaceJS.setAttribute("src","interfaces/AB.js?"+Math.random()); |
309 | 309 |
310 // AB comes with a css file | 310 // AB comes with a css file |
311 var css = document.createElement('link'); | 311 var css = document.createElement('link'); |
312 css.rel = 'stylesheet'; | 312 css.rel = 'stylesheet'; |
313 css.type = 'text/css'; | 313 css.type = 'text/css'; |
3131 str += 'and '+failed[i]; | 3131 str += 'and '+failed[i]; |
3132 } | 3132 } |
3133 str +='.'; | 3133 str +='.'; |
3134 alert(str); | 3134 alert(str); |
3135 console.log(str); | 3135 console.log(str); |
3136 this.storeErrorNode(str); | 3136 this.storeErrorNode(str); |
3137 return false; | 3137 return false; |
3138 }; | 3138 }; |
3139 this.checkOneFragmentSelected = function(){ | |
3140 console.log("checkOneFragmentSelected"); | |
3141 var str = "You should select an answer before continuing"; | |
3142 if(this.comparator.selected === null){ | |
3143 alert(str); | |
3144 return false; | |
3145 } else { | |
3146 return true; | |
3147 } | |
3148 }; | |
3139 this.checkAllPlayed = function() | 3149 this.checkAllPlayed = function() |
3140 { | 3150 { |
3141 var str = "You have not played "; | 3151 var str = "You have not played "; |
3142 var failed = []; | 3152 var failed = []; |
3143 for (var ao of audioEngineContext.audioObjects) | 3153 for (var ao of audioEngineContext.audioObjects) |