Mercurial > hg > webaudioevaluationtool
comparison interfaces/ABX.js @ 2651:22efb2d04bc9
#6: Added for rest
author | Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk> |
---|---|
date | Thu, 19 Jan 2017 16:44:47 +0000 |
parents | 342ef7948c47 |
children | 211364181d16 |
comparison
equal
deleted
inserted
replaced
2650:41b7fcd245da | 2651:22efb2d04bc9 |
---|---|
135 | 135 |
136 function loadTest(page) { | 136 function loadTest(page) { |
137 // Called each time a new test page is to be build. The page specification node is the only item passed in | 137 // Called each time a new test page is to be build. The page specification node is the only item passed in |
138 document.getElementById('box-holders').innerHTML = ""; | 138 document.getElementById('box-holders').innerHTML = ""; |
139 | 139 |
140 var interfaceObj = page.interfaces; | 140 var interfaceObj = interfaceContext.getCombinedInterfaces(page); |
141 if (interfaceObj.length > 1) { | 141 if (interfaceObj.length > 1) { |
142 console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node"); | 142 console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node"); |
143 } | 143 } |
144 interfaceObj = interfaceObj[0]; | 144 interfaceObj = interfaceObj[0]; |
145 | 145 |
155 document.getElementById("pageTitle").textContent = interfaceObj.title; | 155 document.getElementById("pageTitle").textContent = interfaceObj.title; |
156 } | 156 } |
157 | 157 |
158 interfaceContext.comparator = new comparator(page); | 158 interfaceContext.comparator = new comparator(page); |
159 | 159 |
160 var interfaceOptions = specification.interfaces.options.concat(interfaceObj.options); | 160 var interfaceOptions = interfaceObj.options; |
161 for (var option of interfaceOptions) { | 161 for (var option of interfaceOptions) { |
162 if (option.type == "show") { | 162 if (option.type == "show") { |
163 switch (option.name) { | 163 switch (option.name) { |
164 case "playhead": | 164 case "playhead": |
165 var playbackHolder = document.getElementById('playback-holder'); | 165 var playbackHolder = document.getElementById('playback-holder'); |
428 document.getElementById('box-holders').style.marginRight = diff / 2 + 'px'; | 428 document.getElementById('box-holders').style.marginRight = diff / 2 + 'px'; |
429 document.getElementById('box-holders').style.width = boxW + 'px'; | 429 document.getElementById('box-holders').style.width = boxW + 'px'; |
430 } | 430 } |
431 | 431 |
432 function buttonSubmitClick() { | 432 function buttonSubmitClick() { |
433 var checks = []; | 433 var checks = testState.currentStateMap.interfaces[0].options, |
434 checks = checks.concat(testState.currentStateMap.interfaces[0].options); | 434 canContinue = true; |
435 checks = checks.concat(specification.interfaces.options); | |
436 var canContinue = true; | |
437 | 435 |
438 for (var i = 0; i < checks.length; i++) { | 436 for (var i = 0; i < checks.length; i++) { |
439 if (checks[i].type == 'check') { | 437 if (checks[i].type == 'check') { |
440 switch (checks[i].name) { | 438 switch (checks[i].name) { |
441 case 'fragmentPlayed': | 439 case 'fragmentPlayed': |