From a48979159fbfe6eab6bcd068f04f678b0a7ebf01 Mon Sep 17 00:00:00 2001 From: soufiane Date: Wed, 21 Jan 2026 12:04:58 +0100 Subject: [PATCH] wait #7898 @1:00 --- .../fluidbook/cart/fluidbook.cart.kimplay.js | 38 ++++++++++++++++--- style/cart/kimplay.less | 35 +++++++++++++++-- 2 files changed, 64 insertions(+), 9 deletions(-) diff --git a/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js b/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js index 84812345..428aabc7 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js @@ -4,6 +4,8 @@ function FluidbookCartKimplay(cart) { this.data = this.fluidbook.settings.basketReferences; this.showAddToCartTooltips = false; this.items = {}; + this.formDataStorage = window.localStorage.getItem('formData') + this.ps = null; this.init(); } @@ -127,6 +129,15 @@ FluidbookCartKimplay.prototype = { return res; }, + setFormData: function () { + const form = document.getElementById("kimplay-sendcart-form"); + if(!form) { + return false; + } + const formData = new FormData(form); + window.localStorage.setItem('formData', JSON.stringify(formData)) + }, + updateCart: function () { if ($('#kimplaycart').length > 0) { $('#kimplaycart .content').html(this.getCartContent()); @@ -143,9 +154,11 @@ FluidbookCartKimplay.prototype = { }, openCart: function (p2, callback) { + console.log('okkkk') this._endMenu(this.fluidbook.l10n.__('my selection'), this.getCartContent(), function () { callback(); }); + setTimeout(() => this.ps.update(), 500) }, getCartContent: function () { @@ -210,6 +223,7 @@ FluidbookCartKimplay.prototype = { view += ''; view += ''; this.fluidbook.menu.viewWrap(view, 'cart'); + this.ps = new PerfectScrollbar("#kimplaycart .content"); callback(); }, @@ -240,35 +254,47 @@ FluidbookCartKimplay.prototype = { }, getContactForm: function() { + let data = JSON.parse(this.formDataStorage); + if(!data) { + data = { + 'company':'', + 'name':'', + 'firstname':'', + 'mail':'', + 'phone':'', + 'address':'', + } + } + let view = `
${this.fluidbook.menu.getCaption("Mes coordonnées", 'small')}
- +

- +

- +

- +

- +

- +

diff --git a/style/cart/kimplay.less b/style/cart/kimplay.less index 6789b352..71f6964a 100644 --- a/style/cart/kimplay.less +++ b/style/cart/kimplay.less @@ -232,8 +232,35 @@ #kimplaycart { - .caption a.back.small { - right: -10px; + .caption { + padding-right: 10px; + + a.back.small { + right: -10px; + } + } + + .ps__rail-x { + display: none; + } + + .ps__rail-y, + .ps__thumb-y { + width: 5px; + opacity: 1; + } + + &:has(.ps__rail-y) #wrap-kimplaycart { + padding-right: 5px; + } + + .ps__rail-y { + background-color: #bce9e9; + } + + .ps__thumb-y { + background-color: #7dd4e6; + right: 0; } &table { @@ -283,6 +310,8 @@ &.image { width: 130px; + padding-right: 20px; + padding-left: 20px; } &.reference, @@ -378,7 +407,7 @@ } input, textarea { - width: 320px; + width: 380px; text-align: left; padding: 5px 10px; font-size: 14px; -- 2.39.5