comparison core.js @ 1624:9319c38cc278

Fixed projectReturn=null to show XML save in popup window.
author Nicholas Jillings <nickjillings@users.noreply.github.com>
date Tue, 26 May 2015 14:17:32 +0100
parents 307b2eeaa3c8
children 39e56b863075
comparison
equal deleted inserted replaced
1623:307b2eeaa3c8 1624:9319c38cc278
176 // End of pre-test, begin the test 176 // End of pre-test, begin the test
177 preTestQuestions = popup.responses; 177 preTestQuestions = popup.responses;
178 loadTest(0); 178 loadTest(0);
179 } else if (currentState == 'postTest') { 179 } else if (currentState == 'postTest') {
180 postTestQuestions = popup.responses; 180 postTestQuestions = popup.responses;
181 console.log('ALL COLLECTED!'); 181 console.log('ALL COLLECTED!');
182 createProjectSave(projectReturn);
182 }else if (currentState.substr(0,10) == 'testRunPre') 183 }else if (currentState.substr(0,10) == 'testRunPre')
183 { 184 {
184 // Start the test 185 // Start the test
185 var testId = currentState.substr(11,currentState.length-10); 186 var testId = currentState.substr(11,currentState.length-10);
186 currentState = 'testRun-'+testId; 187 currentState = 'testRun-'+testId;
202 } 203 }
203 else if (postXML.childElementCount > 0) 204 else if (postXML.childElementCount > 0)
204 { 205 {
205 currentState = 'testRunPost-'+testId; 206 currentState = 'testRunPost-'+testId;
206 popup.initState(postXML); 207 popup.initState(postXML);
207 }
208 else {
209
210
211 // No post tests, check if we have another test to perform instead
212
213 } 208 }
214 } 209 }
215 console.log(currentState); 210 console.log(currentState);
216 } 211 }
217 212
287 a.download = "save.xml"; 282 a.download = "save.xml";
288 a.textContent = "Save File"; 283 a.textContent = "Save File";
289 284
290 var submitDiv = document.getElementById('download-point'); 285 var submitDiv = document.getElementById('download-point');
291 submitDiv.appendChild(a); 286 submitDiv.appendChild(a);
287 popup.showPopup();
288 popup.popupContent.innerHTML = null;
289 popup.popupContent.appendChild(submitDiv)
292 } 290 }
293 return submitDiv; 291 return submitDiv;
294 } 292 }
295 293
296 function AudioEngine() { 294 function AudioEngine() {