]> _ Git - fluidbook-html5.git/commitdiff
wait #4334 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 5 Mar 2021 15:53:36 +0000 (16:53 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 5 Mar 2021 15:53:36 +0000 (16:53 +0100)
js/libs/fluidbook/cart/fluidbook.cart.grandvision.js

index 8c547cef78d499b3c1272f7276b15cfc3ee47610..7101306e404f9b74011f09ca4aa3e947672cbc48 100644 (file)
@@ -149,7 +149,7 @@ FluidbookCartGrandVision.prototype = {
 
     getExportFileName: function () {
         var date = new Date();
-        return 'GrandVision boxes - ' + date.getFullYear() + '-' + date.getMonth() + '-' + date.getDay();
+        return 'GrandVision - ' + date.getFullYear() + '-' + date.getMonth() + '-' + date.getDay();
     },
 
     exportBoxes: function (print) {
@@ -162,14 +162,16 @@ FluidbookCartGrandVision.prototype = {
         var c = $('#grandvision-pdf');
         $(c).html('');
         $.each(this.boxes, function (index, box) {
-            $(c).append($this.getBox(index));
+            if (index === $this.boxIndex) {
+                $(c).append($this.getBox(index));
+            }
         });
 
 
         var element = $(c).get(0);
         var options = {
             margin: 0,
-            filename: this.getExportFileName() + '.pdf',
+            filename: this.getExportFileName() +'s.pdf',
             image: {type: 'png'},
             html2canvas: {dpi: 150, scale: 2.5, letterRendering: false},
             jsPDF: {unit: 'mm', format: 'A4', orientation: 'portrait'}
@@ -361,7 +363,7 @@ FluidbookCartGrandVision.prototype = {
                         $.confirm({
                             backgroundDismiss: true,
                             title: 'Warning',
-                            content: 'Product already used in another box: <br>'+found.join('<br>'),
+                            content: 'Product already used in another box: <br>' + found.join('<br>'),
                             buttons: {
                                 confirm: {
                                     text: 'Confirm',