# HG changeset patch # User Giulio Moro # Date 1461288424 -3600 # Node ID 5b34e5fed7bb3c47669b6ae0e13eb559860208fd # Parent d2eb0e6ccaaf91736cdc77c250ac2349de1fee3b inactive (non-clickable) boxes in AB (e.g.: for training) diff -r d2eb0e6ccaaf -r 5b34e5fed7bb core.js --- a/core.js Wed Apr 20 16:26:57 2016 +0100 +++ b/core.js Fri Apr 22 02:27:04 2016 +0100 @@ -305,13 +305,13 @@ break; case "AB": - interfaceJS.setAttribute("src","interfaces/AB.js"); + interfaceJS.setAttribute("src","interfaces/AB.js?0"); // AB comes with a css file var css = document.createElement('link'); css.rel = 'stylesheet'; css.type = 'text/css'; - css.href = 'interfaces/AB.css'; + css.href = 'interfaces/AB.css?'+Math.random(); document.getElementsByTagName("head")[0].appendChild(css); break; @@ -892,7 +892,12 @@ if (this.stateIndex == null) { this.initialise(); } - storage.update(); + $('#box-holders').fadeTo(200, 0.1, function(){ + $('#box-holders').fadeTo(200, 1); + }); + + + storage.update(); if (this.stateIndex == -1) { this.stateIndex++; console.log('Starting test...'); diff -r d2eb0e6ccaaf -r 5b34e5fed7bb interfaces/AB.css --- a/interfaces/AB.css Wed Apr 20 16:26:57 2016 +0100 +++ b/interfaces/AB.css Fri Apr 22 02:27:04 2016 +0100 @@ -52,9 +52,12 @@ border: black 1px solid; position: relative; background-color: #FF0000; - border-radius: 20px; + border-radius: 20px; } +div.comparator-selector.inactive{ + background-color: yellow !important; +} div.disabled { background-color: #AAA; } @@ -87,4 +90,4 @@ position: absolute; top: 10px; left: 120px; -} \ No newline at end of file +} diff -r d2eb0e6ccaaf -r 5b34e5fed7bb interfaces/AB.js --- a/interfaces/AB.js Wed Apr 20 16:26:57 2016 +0100 +++ b/interfaces/AB.js Fri Apr 22 02:27:04 2016 +0100 @@ -329,6 +329,9 @@ var node = new this.comparatorBox(audioObject,index,label); audioObject.bindInterface(node); this.comparators.push(node); + if(element.inactive===true){ + node.box.children[0].classList.add('inactive'); + } this.boxHolders.appendChild(node.box); } return this; @@ -416,4 +419,4 @@ // Get the current information in store (remember to appendChild your data to it) // pageSpecification is the current page node configuration // To create new XML nodes, use storage.document.createElement(); -} \ No newline at end of file +}