parent
fe791c2000
commit
453a726a9a
|
@ -450,6 +450,9 @@ class CsvxmlPage {
|
||||||
|
|
||||||
zipUploadToXml(validator) {
|
zipUploadToXml(validator) {
|
||||||
|
|
||||||
|
// Wrap zipping in function to postload it
|
||||||
|
function runZipping() {
|
||||||
|
|
||||||
let zip = new JSZip();
|
let zip = new JSZip();
|
||||||
|
|
||||||
let xmlFiles = validator.generateXml();
|
let xmlFiles = validator.generateXml();
|
||||||
|
@ -475,6 +478,23 @@ class CsvxmlPage {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof JSZip === "undefined") {
|
||||||
|
|
||||||
|
const loadScript = document.createElement("script");
|
||||||
|
loadScript.setAttribute("src", "assets/js/jszip/dist/jszip.min.js");
|
||||||
|
loadScript.addEventListener('load', function() {
|
||||||
|
// console.log("Post-loaded OpenLayers");
|
||||||
|
runZipping();
|
||||||
|
}, {passive: true, once: true});
|
||||||
|
|
||||||
|
document.body.appendChild(loadScript);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
runZipping();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
listValidationErrors(validator) {
|
listValidationErrors(validator) {
|
||||||
|
|
||||||
const dialogueContent = document.createElement("div");
|
const dialogueContent = document.createElement("div");
|
||||||
|
|
|
@ -40,8 +40,6 @@ echo '
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||||
<meta name="description" content="Validate import CSV files for museum-digital" />
|
<meta name="description" content="Validate import CSV files for museum-digital" />
|
||||||
<script src="assets/js/jszip/dist/jszip.min.js" type="text/javascript" async defer></script>
|
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="assets/css/csvxml.css" />
|
<link rel="stylesheet" type="text/css" href="assets/css/csvxml.css" />
|
||||||
<meta name="theme-color" content="#aa4400" />
|
<meta name="theme-color" content="#aa4400" />
|
||||||
<link rel="shortcut icon" sizes="128x128" href="assets/img/mdlogo-csvxml.svg" />
|
<link rel="shortcut icon" sizes="128x128" href="assets/img/mdlogo-csvxml.svg" />
|
||||||
|
|
Loading…
Reference in New Issue
Block a user