Mercurial > hg > waet-hammond-1
comparison core.js @ 1:5b34e5fed7bb
inactive (non-clickable) boxes in AB (e.g.: for training)
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Fri, 22 Apr 2016 02:27:04 +0100 |
parents | d2eb0e6ccaaf |
children | bd0bd3033ac5 |
comparison
equal
deleted
inserted
replaced
0:d2eb0e6ccaaf | 1:5b34e5fed7bb |
---|---|
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"); | 308 interfaceJS.setAttribute("src","interfaces/AB.js?0"); |
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'; |
314 css.href = 'interfaces/AB.css'; | 314 css.href = 'interfaces/AB.css?'+Math.random(); |
315 | 315 |
316 document.getElementsByTagName("head")[0].appendChild(css); | 316 document.getElementsByTagName("head")[0].appendChild(css); |
317 break; | 317 break; |
318 case "Bipolar": | 318 case "Bipolar": |
319 case "ACR": | 319 case "ACR": |
890 }; | 890 }; |
891 this.advanceState = function(){ | 891 this.advanceState = function(){ |
892 if (this.stateIndex == null) { | 892 if (this.stateIndex == null) { |
893 this.initialise(); | 893 this.initialise(); |
894 } | 894 } |
895 storage.update(); | 895 $('#box-holders').fadeTo(200, 0.1, function(){ |
896 $('#box-holders').fadeTo(200, 1); | |
897 }); | |
898 | |
899 | |
900 storage.update(); | |
896 if (this.stateIndex == -1) { | 901 if (this.stateIndex == -1) { |
897 this.stateIndex++; | 902 this.stateIndex++; |
898 console.log('Starting test...'); | 903 console.log('Starting test...'); |
899 if (this.preTestSurvey != null) | 904 if (this.preTestSurvey != null) |
900 { | 905 { |