Mercurial > gemma
comparison client/src/components/systemconfiguration/PDFTemplates.vue @ 3222:83e8e1ea0aff
print_templates: changed route /templates/print to /templates and /templates/print/... to /templates/
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Thu, 09 May 2019 15:14:12 +0200 |
parents | 94935895e6d7 |
children | 6d4d8e7ef881 |
comparison
equal
deleted
inserted
replaced
3221:899914a18d7e | 3222:83e8e1ea0aff |
---|---|
111 var templateData = ""; | 111 var templateData = ""; |
112 var element = document.createElement("a"); | 112 var element = document.createElement("a"); |
113 element.style.display = "none"; | 113 element.style.display = "none"; |
114 element.setAttribute("download", template.name + ".json"); | 114 element.setAttribute("download", template.name + ".json"); |
115 document.body.appendChild(element); | 115 document.body.appendChild(element); |
116 HTTP.get("/templates/print/" + template.name, { | 116 HTTP.get("/templates/" + template.name, { |
117 headers: { | 117 headers: { |
118 "X-Gemma-Auth": localStorage.getItem("token"), | 118 "X-Gemma-Auth": localStorage.getItem("token"), |
119 "Content-type": "text/xml; charset=UTF-8" | 119 "Content-type": "text/xml; charset=UTF-8" |
120 } | 120 } |
121 }) | 121 }) |
253 }; | 253 }; |
254 reader.onerror = error => console.log(error); | 254 reader.onerror = error => console.log(error); |
255 reader.readAsText(this.$refs.uploadTemplate.files[0]); | 255 reader.readAsText(this.$refs.uploadTemplate.files[0]); |
256 }, | 256 }, |
257 loadTemplates() { | 257 loadTemplates() { |
258 HTTP.get("/templates/print", { | 258 HTTP.get("/templates", { |
259 headers: { | 259 headers: { |
260 "X-Gemma-Auth": localStorage.getItem("token"), | 260 "X-Gemma-Auth": localStorage.getItem("token"), |
261 "Content-type": "text/xml; charset=UTF-8" | 261 "Content-type": "text/xml; charset=UTF-8" |
262 } | 262 } |
263 }) | 263 }) |