diff 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
line wrap: on
line diff
--- a/interfaces/horizontal-sliders.js	Thu Jan 19 16:24:00 2017 +0000
+++ b/interfaces/horizontal-sliders.js	Thu Jan 19 16:44:47 2017 +0000
@@ -120,7 +120,7 @@
     var feedbackHolder = document.getElementById('feedbackHolder');
     feedbackHolder.innerHTML = "";
 
-    var interfaceObj = page.interfaces;
+    var interfaceObj = interfaceContext.getCombinedInterfaces(page);
     if (interfaceObj.length > 1) {
         console.log("WARNING - This interface only supports one <interface> node per page. Using first interface node");
     }
@@ -186,8 +186,7 @@
         }
 
     });
-    var interfaceOptions = specification.interfaces.options.concat(interfaceObj.options);
-    for (var option of interfaceOptions) {
+    for (var option of interfaceObj.options) {
         if (option.type == "show") {
             switch (option.name) {
                 case "playhead":
@@ -395,10 +394,8 @@
 
 function buttonSubmitClick() // TODO: Only when all songs have been played!
 {
-    var checks = [];
-    checks = checks.concat(testState.currentStateMap.interfaces[0].options);
-    checks = checks.concat(specification.interfaces.options);
-    var canContinue = true;
+    var checks = testState.currentStateMap.interfaces[0].options,
+        canContinue = true;
 
     // Check that the anchor and reference objects are correctly placed
     if (interfaceContext.checkHiddenAnchor() == false) {