Mercurial > hg > waet-hammond-1
changeset 10:ccd074f060d3
Discrete interface: moved submit button, persistent highlight of the latest fragment played, labelling starting from 1 instead of 0
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Sun, 24 Apr 2016 20:49:12 +0100 |
parents | 0d161eb5c083 |
children | 4261f898bd4c |
files | interfaces/discrete.css interfaces/discrete.js |
diffstat | 2 files changed, 20 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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';