changeset 1039:c576b5d59c58

linter
author Thomas Junk <thomas.junk@intevation.de>
date Wed, 24 Oct 2018 16:43:43 +0200
parents e8ebfbc2aa05
children aac42dacb503
files client/src/pdftool/Pdftool.vue
diffstat 1 files changed, 27 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/pdftool/Pdftool.vue	Wed Oct 24 16:41:51 2018 +0200
+++ b/client/src/pdftool/Pdftool.vue	Wed Oct 24 16:43:43 2018 +0200
@@ -9,18 +9,34 @@
                     <h4 class="card-title">Generate PDF</h4>
                 </div>
                 <hr>
-                <b>Chose format:</b><br>
+                <b>Chose format:</b>
+                <br>
                 <select v-model="form.format" class="d-block w-100">
                     <option>landscape</option>
                     <option>portrait</option>
                 </select>
                 <small class="d-block my-2">
-                    <input type="radio" id="pdfexport-downloadtype-download" value="download" v-model="form.downloadType" selected />
+                    <input
+                        type="radio"
+                        id="pdfexport-downloadtype-download"
+                        value="download"
+                        v-model="form.downloadType"
+                        selected
+                    >
                     <label for="pdfexport-downloadtype-download" class="ml-1 mr-2">Download</label>
-                    <input type="radio" id="pdfexport-downloadtype-open" value="open" v-model="form.downloadType" />
+                    <input
+                        type="radio"
+                        id="pdfexport-downloadtype-open"
+                        value="open"
+                        v-model="form.downloadType"
+                    >
                     <label for="pdfexport-downloadtype-open" class="ml-1">Open in new window</label>
                 </small>
-                <button @click="download" type="button" class="btn btn-sm btn-info d-block w-100">Generate PDF</button>
+                <button
+                    @click="download"
+                    type="button"
+                    class="btn btn-sm btn-info d-block w-100"
+                >Generate PDF</button>
             </div>
         </div>
     </div>
@@ -80,7 +96,7 @@
  * Markus Kottländer <markus.kottlaender@intevation.de>
  */
 import { mapState } from "vuex";
-import { HTTP } from "../application/lib/http";
+//import { HTTP } from "../application/lib/http";
 
 export default {
   name: "pdftool",
@@ -104,7 +120,7 @@
         pdftoolexpanded: !this.collapsed,
         pdftoolcollapsed: this.collapsed
       };
-    },
+    }
   },
   methods: {
     collapse() {
@@ -113,17 +129,17 @@
     download() {
       // generate PDF and open it
       // TODO: replace this src with an API reponse after actually generating PDFs
-      let src = this.form.format === "landscape"
-       ? "/img/PrintTemplate-Var2-Landscape.pdf"
-       : "/img/PrintTemplate-Var2-Portrait.pdf"
+      let src =
+        this.form.format === "landscape"
+          ? "/img/PrintTemplate-Var2-Landscape.pdf"
+          : "/img/PrintTemplate-Var2-Portrait.pdf";
 
       let a = document.createElement("a");
       a.href = src;
 
       if (this.form.downloadType === "download")
         a.download = src.substr(src.lastIndexOf("/") + 1);
-      else
-        a.target = "_blank";
+      else a.target = "_blank";
 
       document.body.appendChild(a);
       a.click();