# HG changeset patch # User Giulio Moro # Date 1461527352 -3600 # Node ID ccd074f060d3d26c7b3541774f0a10b82fa3c884 # Parent 0d161eb5c083691c3ac02ed385210cbae07bceb3 Discrete interface: moved submit button, persistent highlight of the latest fragment played, labelling starting from 1 instead of 0 diff -r 0d161eb5c083 -r ccd074f060d3 interfaces/discrete.css --- a/interfaces/discrete.css Sun Apr 24 14:41:41 2016 +0100 +++ b/interfaces/discrete.css Sun Apr 24 20:49:12 2016 +0100 @@ -33,6 +33,7 @@ /* Specify any button structure or style */ min-width: 20px; background-color: #ddd + display: none; } div#slider-holder { @@ -122,4 +123,19 @@ button#playback-button{ display: none; +} + +button#submit-button{ + margin-top: 0; + margin-bottom: 30px; + padding: 5px; + width: 130px; + font-size: 20px; + height: 30px; +} + +div#interface-buttons{ + margin: auto; + text-align: center; + padding-bottom: 30px; } \ No newline at end of file diff -r 0d161eb5c083 -r ccd074f060d3 interfaces/discrete.js --- a/interfaces/discrete.js Sun Apr 24 14:41:41 2016 +0100 +++ b/interfaces/discrete.js Sun Apr 24 20:49:12 2016 +0100 @@ -55,10 +55,9 @@ }; // Create Submit (save) button var submit = document.createElement("button"); - submit.innerHTML = 'Next'; + submit.innerHTML = 'Submit'; submit.onclick = buttonSubmitClick; submit.id = 'submit-button'; - submit.style.float = 'left'; // Append the interface buttons into the interfaceButtons object. interfaceButtons.appendChild(playback); interfaceButtons.appendChild(submit); @@ -97,9 +96,9 @@ // Inject into HTML testContent.appendChild(title); // Insert the title testContent.appendChild(pagetitle); - testContent.appendChild(interfaceButtons); testContent.appendChild(sliderBox); testContent.appendChild(feedbackHolder); + testContent.appendChild(interfaceButtons); interfaceContext.insertPoint.appendChild(testContent); // Load the full interface @@ -209,7 +208,7 @@ label = String.fromCharCode(65 + index); break; default: - label = ""+index; + label = ""+(index+1); break; } var sliderObj = new discreteObject(audioObject,label,interfaceScales); @@ -354,7 +353,7 @@ { // Called by audioObject when playback stops this.play.setAttribute("playstate","ready"); - $(this.holder).removeClass('track-slider-playing'); +// $(this.holder).removeClass('track-slider-playing'); this.play.textContent = "Play"; } @@ -528,7 +527,6 @@ text.appendChild(textC); text.className = "scale-text"; textHolder.appendChild(text); - console.log('here') // text.style.width = $(text.children[0]).width()+'px'; text.style.width = scaleTextWidthPercent+"%"; text.style.left = (posPix+150-($(text).width()/2)) +'px';