Mercurial > hg > webaudioevaluationtool
comparison core.js @ 1345:36bbc9972852
Beginning discrete / likert interfaces.
author | Nicholas Jillings <nickjillings@users.noreply.github.com> |
---|---|
date | Wed, 13 Jan 2016 16:49:59 +0000 |
parents | d7526f80cd92 |
children | 8590621eb0e9 |
comparison
equal
deleted
inserted
replaced
1344:d7526f80cd92 | 1345:36bbc9972852 |
---|---|
172 css.rel = 'stylesheet'; | 172 css.rel = 'stylesheet'; |
173 css.type = 'text/css'; | 173 css.type = 'text/css'; |
174 css.href = 'interfaces/AB.css'; | 174 css.href = 'interfaces/AB.css'; |
175 | 175 |
176 document.getElementsByTagName("head")[0].appendChild(css); | 176 document.getElementsByTagName("head")[0].appendChild(css); |
177 break; | |
178 case "Bipolar": | |
179 case "ACR": | |
180 case "DCR": | |
181 case "CCR": | |
177 case "ABC": | 182 case "ABC": |
178 // Above enumerate to horizontal sliders | 183 // Above enumerate to horizontal sliders |
179 interfaceJS.setAttribute("src","interfaces/horizontal-sliders.js"); | 184 interfaceJS.setAttribute("src","interfaces/horizontal-sliders.js"); |
180 | 185 |
181 // horizontal-sliders comes with a css file | 186 // horizontal-sliders comes with a css file |
183 css.rel = 'stylesheet'; | 188 css.rel = 'stylesheet'; |
184 css.type = 'text/css'; | 189 css.type = 'text/css'; |
185 css.href = 'interfaces/horizontal-sliders.css'; | 190 css.href = 'interfaces/horizontal-sliders.css'; |
186 | 191 |
187 document.getElementsByTagName("head")[0].appendChild(css); | 192 document.getElementsByTagName("head")[0].appendChild(css); |
193 break; | |
194 case "discrete": | |
195 case "likert": | |
196 // Above enumerate to horizontal discrete radios | |
197 interfaceJS.setAttribute("src","interfaces/discrete.js"); | |
198 | |
199 // horizontal-sliders comes with a css file | |
200 var css = document.createElement('link'); | |
201 css.rel = 'stylesheet'; | |
202 css.type = 'text/css'; | |
203 css.href = 'interfaces/discrete.css'; | |
204 | |
205 document.getElementsByTagName("head")[0].appendChild(css); | |
206 break; | |
188 } | 207 } |
189 document.getElementsByTagName("head")[0].appendChild(interfaceJS); | 208 document.getElementsByTagName("head")[0].appendChild(interfaceJS); |
190 | 209 |
191 // Create the audio engine object | 210 // Create the audio engine object |
192 audioEngineContext = new AudioEngine(specification); | 211 audioEngineContext = new AudioEngine(specification); |
2914 this.specification = specification; | 2933 this.specification = specification; |
2915 this.parent = parent; | 2934 this.parent = parent; |
2916 this.XMLDOM = this.parent.document.createElement('page'); | 2935 this.XMLDOM = this.parent.document.createElement('page'); |
2917 this.XMLDOM.setAttribute('id',specification.id); | 2936 this.XMLDOM.setAttribute('id',specification.id); |
2918 this.XMLDOM.setAttribute('presentedId',specification.presentedId); | 2937 this.XMLDOM.setAttribute('presentedId',specification.presentedId); |
2919 if (specification.preTest != undefined){this.preTest = new this.surveyNode(this,this.root,this.specification.preTest);} | 2938 if (specification.preTest != undefined){this.preTest = new this.parent.surveyNode(this.parent,this.XMLDOM,this.specification.preTest);} |
2920 if (specification.postTest != undefined){this.postTest = new this.surveyNode(this,this.root,this.specification.postTest);} | 2939 if (specification.postTest != undefined){this.postTest = new this.parent.surveyNode(this.parent,this.XMLDOM,this.specification.postTest);} |
2921 | 2940 |
2922 // Add any page metrics | 2941 // Add any page metrics |
2923 var page_metric = this.parent.document.createElement('metric'); | 2942 var page_metric = this.parent.document.createElement('metric'); |
2924 this.XMLDOM.appendChild(page_metric); | 2943 this.XMLDOM.appendChild(page_metric); |
2925 | 2944 |