]> _ Git - fluidbook-html5.git/commitdiff
#7423
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 11 Apr 2025 15:29:07 +0000 (17:29 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 11 Apr 2025 15:29:07 +0000 (17:29 +0200)
js/libs/fluidbook/cart/fluidbook.cart.puma.js

index 8d091d75d0bcf3135f0e18c64a548f46d1d586e4..6a39b209ffa0ca73e7cd2c6e1bd7366ce147cbcd 100644 (file)
@@ -247,8 +247,12 @@ FluidbookCartPuma.prototype = {
 
 
     exportPlanogramme: function () {
-        let url = this.fluidbook.service.getBaseURL(true) + 'puma/planogramme/' + this.fluidbook.settings.id + '_' + this.fluidbook.settings.cid + '/' + encodeURIComponent(this.getItemsReferences().join(','));
-        console.log(url);
+        this.fluidbook.displayLoader();
+        this.fluidbook.hideLoader(3);
+        let url = this.fluidbook.service.getBaseURL(true) + 'puma/planogramme/' + this.fluidbook.settings.id + '_' + this.fluidbook.settings.cid + '/' + encodeURIComponent(this.getItemsReferences().join(',')) + '/pdf/' + encodeURIComponent(this.getExportFileName());
+        $("#puma_planogramme").remove();
+        $("body").append('<a href="' + url + '" download="' + this.getExportFileName() + '.pdf' + '" id="puma_planogramme"></a>');
+        $("#puma_planogramme").get(0).click();
     },
 
     exportPDF: function () {