Mercurial > hg > webaudioevaluationtool
comparison interfaces/horizontal-sliders.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 | 87d9f785f1ec |
comparison
equal
deleted
inserted
replaced
2650:41b7fcd245da | 2651:22efb2d04bc9 |
---|---|
118 var id = page.id; | 118 var id = page.id; |
119 | 119 |
120 var feedbackHolder = document.getElementById('feedbackHolder'); | 120 var feedbackHolder = document.getElementById('feedbackHolder'); |
121 feedbackHolder.innerHTML = ""; | 121 feedbackHolder.innerHTML = ""; |
122 | 122 |
123 var interfaceObj = page.interfaces; | 123 var interfaceObj = interfaceContext.getCombinedInterfaces(page); |
124 if (interfaceObj.length > 1) { | 124 if (interfaceObj.length > 1) { |
125 console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node"); | 125 console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node"); |
126 } | 126 } |
127 interfaceObj = interfaceObj[0]; | 127 interfaceObj = interfaceObj[0]; |
128 | 128 |
184 interfaceContext.commentBoxes.createCommentBox(audioObject); | 184 interfaceContext.commentBoxes.createCommentBox(audioObject); |
185 index += 1; | 185 index += 1; |
186 } | 186 } |
187 | 187 |
188 }); | 188 }); |
189 var interfaceOptions = specification.interfaces.options.concat(interfaceObj.options); | 189 for (var option of interfaceObj.options) { |
190 for (var option of interfaceOptions) { | |
191 if (option.type == "show") { | 190 if (option.type == "show") { |
192 switch (option.name) { | 191 switch (option.name) { |
193 case "playhead": | 192 case "playhead": |
194 var playbackHolder = document.getElementById('playback-holder'); | 193 var playbackHolder = document.getElementById('playback-holder'); |
195 if (playbackHolder == null) { | 194 if (playbackHolder == null) { |
393 } | 392 } |
394 } | 393 } |
395 | 394 |
396 function buttonSubmitClick() // TODO: Only when all songs have been played! | 395 function buttonSubmitClick() // TODO: Only when all songs have been played! |
397 { | 396 { |
398 var checks = []; | 397 var checks = testState.currentStateMap.interfaces[0].options, |
399 checks = checks.concat(testState.currentStateMap.interfaces[0].options); | 398 canContinue = true; |
400 checks = checks.concat(specification.interfaces.options); | |
401 var canContinue = true; | |
402 | 399 |
403 // Check that the anchor and reference objects are correctly placed | 400 // Check that the anchor and reference objects are correctly placed |
404 if (interfaceContext.checkHiddenAnchor() == false) { | 401 if (interfaceContext.checkHiddenAnchor() == false) { |
405 return; | 402 return; |
406 } | 403 } |