comparison core.js @ 2161:4208c3b73b74

WIP. ABX Framework. Minor core.js modifications.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Wed, 16 Mar 2016 13:31:42 +0000
parents 686f1fb84d7c
children 6dbb9c24d53e
comparison
equal deleted inserted replaced
2160:8ca724deb572 2161:4208c3b73b74
279 var interfaceJS = document.createElement('script'); 279 var interfaceJS = document.createElement('script');
280 interfaceJS.setAttribute("type","text/javascript"); 280 interfaceJS.setAttribute("type","text/javascript");
281 switch(specification.interface) 281 switch(specification.interface)
282 { 282 {
283 case "APE": 283 case "APE":
284 interfaceJS.setAttribute("src","interfaces/ape.js"); 284 interfaceJS.setAttribute("src","interfaces/ape.js");
285 285
286 // APE comes with a css file 286 // APE comes with a css file
287 var css = document.createElement('link'); 287 var css = document.createElement('link');
288 css.rel = 'stylesheet'; 288 css.rel = 'stylesheet';
289 css.type = 'text/css'; 289 css.type = 'text/css';
290 css.href = 'interfaces/ape.css'; 290 css.href = 'interfaces/ape.css';
291 291
292 document.getElementsByTagName("head")[0].appendChild(css); 292 document.getElementsByTagName("head")[0].appendChild(css);
293 break; 293 break;
294 294
295 case "MUSHRA": 295 case "MUSHRA":
296 interfaceJS.setAttribute("src","interfaces/mushra.js"); 296 interfaceJS.setAttribute("src","interfaces/mushra.js");
297 297
298 // MUSHRA comes with a css file 298 // MUSHRA comes with a css file
299 var css = document.createElement('link'); 299 var css = document.createElement('link');
300 css.rel = 'stylesheet'; 300 css.rel = 'stylesheet';
301 css.type = 'text/css'; 301 css.type = 'text/css';
302 css.href = 'interfaces/mushra.css'; 302 css.href = 'interfaces/mushra.css';
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");
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';
315 315
316 document.getElementsByTagName("head")[0].appendChild(css); 316 document.getElementsByTagName("head")[0].appendChild(css);
317 break; 317 break;
318
319 case "ABX":
320 interfaceJS.setAttribute("src","interfaces/ABX.js");
321
322 // AB comes with a css file
323 var css = document.createElement('link');
324 css.rel = 'stylesheet';
325 css.type = 'text/css';
326 css.href = 'interfaces/ABX.css';
327
328 document.getElementsByTagName("head")[0].appendChild(css);
329 break;
330
318 case "Bipolar": 331 case "Bipolar":
319 case "ACR": 332 case "ACR":
320 case "DCR": 333 case "DCR":
321 case "CCR": 334 case "CCR":
322 case "ABC": 335 case "ABC":
323 // Above enumerate to horizontal sliders 336 // Above enumerate to horizontal sliders
324 interfaceJS.setAttribute("src","interfaces/horizontal-sliders.js"); 337 interfaceJS.setAttribute("src","interfaces/horizontal-sliders.js");
325 338
326 // horizontal-sliders comes with a css file 339 // horizontal-sliders comes with a css file
327 var css = document.createElement('link'); 340 var css = document.createElement('link');
328 css.rel = 'stylesheet'; 341 css.rel = 'stylesheet';
329 css.type = 'text/css'; 342 css.type = 'text/css';
330 css.href = 'interfaces/horizontal-sliders.css'; 343 css.href = 'interfaces/horizontal-sliders.css';
331 344
332 document.getElementsByTagName("head")[0].appendChild(css); 345 document.getElementsByTagName("head")[0].appendChild(css);
333 break; 346 break;
334 case "discrete": 347 case "discrete":
335 case "likert": 348 case "likert":
336 // Above enumerate to horizontal discrete radios 349 // Above enumerate to horizontal discrete radios
337 interfaceJS.setAttribute("src","interfaces/discrete.js"); 350 interfaceJS.setAttribute("src","interfaces/discrete.js");
338 351
339 // horizontal-sliders comes with a css file 352 // horizontal-sliders comes with a css file
340 var css = document.createElement('link'); 353 var css = document.createElement('link');
341 css.rel = 'stylesheet'; 354 css.rel = 'stylesheet';
342 css.type = 'text/css'; 355 css.type = 'text/css';
343 css.href = 'interfaces/discrete.css'; 356 css.href = 'interfaces/discrete.css';
344 357
345 document.getElementsByTagName("head")[0].appendChild(css); 358 document.getElementsByTagName("head")[0].appendChild(css);
346 break; 359 break;
347 } 360 }
348 document.getElementsByTagName("head")[0].appendChild(interfaceJS); 361 document.getElementsByTagName("head")[0].appendChild(interfaceJS);
349 362
350 // Create the audio engine object 363 // Create the audio engine object
351 audioEngineContext = new AudioEngine(specification); 364 audioEngineContext = new AudioEngine(specification);