comparison interfaces/horizontal-sliders.js @ 2396:dc13bd68ea34

Fix for #93 for all interfaces which have outside-reference (all except ABX)
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Thu, 26 May 2016 09:35:07 +0100
parents 5b23f2e05207
children b7ed9d43ea87
comparison
equal deleted inserted replaced
2395:dde1f3254762 2396:dc13bd68ea34
60 submit.id = 'submit-button'; 60 submit.id = 'submit-button';
61 submit.style.float = 'left'; 61 submit.style.float = 'left';
62 // Append the interface buttons into the interfaceButtons object. 62 // Append the interface buttons into the interfaceButtons object.
63 interfaceButtons.appendChild(playback); 63 interfaceButtons.appendChild(playback);
64 interfaceButtons.appendChild(submit); 64 interfaceButtons.appendChild(submit);
65
66 // Create outside reference holder
67 var outsideRef = document.createElement("div");
68 outsideRef.id = "outside-reference-holder";
65 69
66 // Create a slider box 70 // Create a slider box
67 var sliderBox = document.createElement('div'); 71 var sliderBox = document.createElement('div');
68 sliderBox.style.width = "100%"; 72 sliderBox.style.width = "100%";
69 sliderBox.style.height = window.innerHeight - 200+12 + 'px'; 73 sliderBox.style.height = window.innerHeight - 200+12 + 'px';
96 100
97 // Inject into HTML 101 // Inject into HTML
98 testContent.appendChild(title); // Insert the title 102 testContent.appendChild(title); // Insert the title
99 testContent.appendChild(pagetitle); 103 testContent.appendChild(pagetitle);
100 testContent.appendChild(interfaceButtons); 104 testContent.appendChild(interfaceButtons);
105 testContent.appendChild(outsideRef);
101 testContent.appendChild(sliderBox); 106 testContent.appendChild(sliderBox);
102 testContent.appendChild(feedbackHolder); 107 testContent.appendChild(feedbackHolder);
103 interfaceContext.insertPoint.appendChild(testContent); 108 interfaceContext.insertPoint.appendChild(testContent);
104 109
105 // Load the full interface 110 // Load the full interface
163 } 168 }
164 } 169 }
165 } 170 }
166 171
167 // Delete outside reference 172 // Delete outside reference
168 var outsideReferenceHolder = document.getElementById('outside-reference'); 173 document.getElementById("outside-reference-holder").innerHTML = "";
169 if (outsideReferenceHolder != null) {
170 document.getElementById('interface-buttons').removeChild(outsideReferenceHolder);
171 }
172 174
173 var sliderBox = document.getElementById('slider-holder'); 175 var sliderBox = document.getElementById('slider-holder');
174 sliderBox.innerHTML = ""; 176 sliderBox.innerHTML = "";
175 177
176 var commentBoxPrefix = "Comment on track"; 178 var commentBoxPrefix = "Comment on track";
192 194
193 var audioObject = audioEngineContext.newTrack(element); 195 var audioObject = audioEngineContext.newTrack(element);
194 if (element.type == 'outside-reference') 196 if (element.type == 'outside-reference')
195 { 197 {
196 // Construct outside reference; 198 // Construct outside reference;
197 var orNode = new interfaceContext.outsideReferenceDOM(audioObject,index,document.getElementById('interface-buttons')); 199 var orNode = new interfaceContext.outsideReferenceDOM(audioObject,index,document.getElementById("outside-reference-holder"));
198 audioObject.bindInterface(orNode); 200 audioObject.bindInterface(orNode);
199 } else { 201 } else {
200 // Create a slider per track 202 // Create a slider per track
201 switch(audioObject.specification.parent.label) { 203 switch(audioObject.specification.parent.label) {
202 case "none": 204 case "none":