comparison core.js @ 1643:52f0cabcf969

Added ape.css, removed styles from .js to clean up.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Fri, 10 Apr 2015 12:02:10 +0100
parents 06e4d36ca9d7
children 2991b5476c7c
comparison
equal deleted inserted replaced
1642:06e4d36ca9d7 1643:52f0cabcf969
18 18
19 19
20 20
21 21
22 /* create the web audio API context and store in audioContext*/ 22 /* create the web audio API context and store in audioContext*/
23 var audioContext; 23 var audioContext; // Hold the browser web audio API
24 var projectXML; 24 var projectXML; // Hold the parsed setup XML
25 var audioEngineContext; 25 var testXMLSetups; // Hold the parsed test instances
26 var projectReturn; 26 var testResultsHolders; // Hold the results from each test for publishing to XML
27 var preTestQuestions = document.createElement('PreTest'); 27 var currentTestHolder; // Hold an intermediate results during test - metrics
28 var postTestQuestions = document.createElement('PostTest'); 28 var audioEngineContext; // The custome AudioEngine object
29 var projectReturn; // Hold the URL for the return
30 var preTestQuestions = document.createElement('PreTest'); // Store any pre-test question response
31 var postTestQuestions = document.createElement('PostTest'); // Store any post-test question response
29 32
30 window.onload = function() { 33 window.onload = function() {
31 // Function called once the browser has loaded all files. 34 // Function called once the browser has loaded all files.
32 // This should perform any initial commands such as structure / loading documents 35 // This should perform any initial commands such as structure / loading documents
33 36
62 var interfaceType = xmlSetup[0].attributes['interface']; 65 var interfaceType = xmlSetup[0].attributes['interface'];
63 var interfaceJS = document.createElement('script'); 66 var interfaceJS = document.createElement('script');
64 interfaceJS.setAttribute("type","text/javascript"); 67 interfaceJS.setAttribute("type","text/javascript");
65 if (interfaceType.value == 'APE') { 68 if (interfaceType.value == 'APE') {
66 interfaceJS.setAttribute("src","ape.js"); 69 interfaceJS.setAttribute("src","ape.js");
70
71 // APE comes with a css file
72 var css = document.createElement('link');
73 css.rel = 'stylesheet';
74 css.type = 'text/css';
75 css.href = 'ape.css';
76
77 document.getElementsByTagName("head")[0].appendChild(css);
67 } 78 }
68 document.getElementsByTagName("head")[0].appendChild(interfaceJS); 79 document.getElementsByTagName("head")[0].appendChild(interfaceJS);
69 } 80 }
70 81
71 function createProjectSave(destURL) { 82 function createProjectSave(destURL) {