comparison js/core.js @ 2707:4125da39666e

Merge branch 'master' into vnext
author Nicholas Jillings <nicholas.jillings@mail.bcu.ac.uk>
date Mon, 20 Mar 2017 16:22:11 +0000
parents 8f485581ee73 2f2aaef246af
children 2395223deef2
comparison
equal deleted inserted replaced
2706:8f485581ee73 2707:4125da39666e
433 console.log("WARNING - Could not update at this time"); 433 console.log("WARNING - Could not update at this time");
434 createProjectSave("local"); 434 createProjectSave("local");
435 } else { 435 } else {
436 var parser = new DOMParser(); 436 var parser = new DOMParser();
437 var xmlDoc = parser.parseFromString(xmlhttp.responseText, "application/xml"); 437 var xmlDoc = parser.parseFromString(xmlhttp.responseText, "application/xml");
438 var response = xmlDoc.firstElementChild; 438 var response = xmlDoc.getElementsByTagName('response')[0];
439 if (response.nodeName == "response" && response.getAttribute("state") == "OK") { 439 if (response.getAttribute("state") == "OK") {
440 window.onbeforeunload = undefined; 440 window.onbeforeunload = undefined;
441 var file = response.getElementsByTagName("file")[0]; 441 var file = response.getElementsByTagName("file")[0];
442 console.log("Save: OK, written " + file.getAttribute("bytes") + "B"); 442 console.log("Intermediate save: OK, written " + file.getAttribute("bytes") + "B");
443 if (typeof specification.returnURL == "string" && specification.returnURL.length > 0) { 443 if (typeof specification.returnURL == "string" && specification.returnURL.length > 0) {
444 window.location = specification.returnURL; 444 window.location = specification.returnURL;
445 } else { 445 } else {
446 popup.popupContent.textContent = specification.exitText; 446 popup.popupContent.textContent = specification.exitText;
447 } 447 }