From: Vincent Vanwaelscappel Date: Fri, 3 Oct 2025 16:03:08 +0000 (+0200) Subject: #7774 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6f733ab9e3987dda594ff24ab03f07b56d6866de;p=fluidbook-html5.git #7774 --- diff --git a/js/libs/fluidbook/cart/fluidbook.cart.puma.js b/js/libs/fluidbook/cart/fluidbook.cart.puma.js index 1d72fd0f..a8c433bc 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.puma.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.puma.js @@ -4,6 +4,7 @@ function FluidbookCartPuma(cart) { this.fluidbook = this.cart.fluidbook; this.data = this.fluidbook.settings.basketReferences; this.exportFileName = ''; + this.exportData; this.base64URL = {}; this.base64Loading = 0; this.init(); @@ -16,7 +17,7 @@ FluidbookCartPuma.prototype = { $(document).on(this.fluidbook.input.clickEvent, '.exportCartPDF', function () { $this.chooseFileName(function () { $this.exportPlanogramme(); - }); + }, '

Options

'); return false; }); @@ -247,9 +248,19 @@ FluidbookCartPuma.prototype = { exportPlanogramme: function () { + let GET = {}; + $.each(this.exportData, function (k, v) { + GET[v.name] = v.value; + }); + if(GET.pa===undefined){ + GET.pa = 0; + } + if(GET.pvp===undefined){ + GET.pvp = 0; + } 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()); + 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()) + '/' + (GET.pa == '1' ? '1' : '0') + '/' + (GET.pvp == '1' ? '1' : '0'); console.log(url); $("#puma_planogramme").remove(); $("body").append(''); @@ -344,15 +355,19 @@ FluidbookCartPuma.prototype = { }); }, - chooseFileName: function (callback) { + chooseFileName: function (callback, contents) { + if (contents === undefined) { + contents = ''; + } var $this = this; $.confirm({ title: 'Name your file', - content: '' + '
' + '
' + '' + '
' + '
', + content: '' + '
' + '
' + '' + contents + '
' + '
', buttons: { formSubmit: { text: 'Submit', btnClass: 'btn-ok', action: function () { $this.exportFileName = this.$content.find('.name').val(); + $this.exportData = this.$content.find('form').serializeArray(); callback(); } }, cancel: function () { diff --git a/style/cart/puma.less b/style/cart/puma.less index 0dd69cc4..3a0bfde7 100644 --- a/style/cart/puma.less +++ b/style/cart/puma.less @@ -151,4 +151,19 @@ } } +} + + +.jconfirm .jconfirm-box .form-group { + label { + margin: 5px 0; + display: block; + + input[type="checkbox"] { + width: auto; + display: inline-block; + accent-color: #af9471; + margin-right: 15px; + } + } } \ No newline at end of file