diff client/src/components/Pdftool.vue @ 4677:fa55e48bbca1

client: improve filename generation for downloads * unify filename for the generated csv files * move function to mixins.js * mark strings in filename for translations * replace whitespace with "-"
author Fadi Abbud <fadi.abbud@intevation.de>
date Tue, 15 Oct 2019 17:16:36 +0200
parents c6349030ae60
children 6c1dd2fbe2ee
line wrap: on
line diff
--- a/client/src/components/Pdftool.vue	Tue Oct 15 16:28:46 2019 +0200
+++ b/client/src/components/Pdftool.vue	Tue Oct 15 17:16:36 2019 +0200
@@ -211,7 +211,7 @@
       if (this.bottleneckForPrint) {
         // TODO: Check if the view contains the selected bottleneck
         // to avoid including bottleneck info in pdf in case view has changed to another location
-        filename = `BN-${sanitize(this.bottleneckForPrint)}`;
+        filename = `BN-${sanitize(this.bottleneckForPrint).replace(/ /g, "-")}`;
         if (this.selectedSurvey) {
           filename += "-sr" + this.selectedSurvey.date_info.replace(/-/g, "");
         }