From: soufiane Date: Mon, 19 Jan 2026 12:54:28 +0000 (+0100) Subject: wip #7898 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=a53aded39f8bc0f0dc9e86d2f51abe5cfa8922c3;p=fluidbook-html5.git wip #7898 --- diff --git a/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js b/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js index 24c50e89..b104ff21 100644 --- a/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js +++ b/js/libs/fluidbook/cart/fluidbook.cart.kimplay.js @@ -11,6 +11,7 @@ FluidbookCartKimplay.prototype = { init: function () { var $this = this; this.items = this.fluidbook.cache.get('cart', {}); + $(document).on(this.fluidbook.input.clickEvent, '#open-request', function () { let input = $(this).closest('#kimplaycart').find('[name=qty]'); $.each(input, function (i, item) { @@ -29,11 +30,12 @@ FluidbookCartKimplay.prototype = { $(document).on(this.fluidbook.input.clickEvent, '#kimplay-additem button', function () { let form = $(this).closest('#kimplay-additem'); - $this.items['' + $(this).data('ref')] = { + $this.items[''+$(this).data('ref')] = { name: $(form).find('h3').text(), quantity: $(form).find('[name=qty]').val(), comment: $(form).find('[name=comment]').val() }; + $this.fluidbook.tooltip.displayTooltipDuring($this.fluidbook.l10n.__("the item has been added to your cart"), 2500); $this.fluidbook.menu.closeView(); $this.save(); @@ -41,7 +43,7 @@ FluidbookCartKimplay.prototype = { }, emptyCart: function () { - this.items = []; + this.items = {}; this.updateCart(); this.save(); resize(); @@ -59,7 +61,7 @@ FluidbookCartKimplay.prototype = { } let view = `
- ${this.fluidbook.menu.getCaption("", 'small')} + ${this.fluidbook.menu.getCaption("", 'small')}
diff --git a/style/cart/kimplay.less b/style/cart/kimplay.less index 14d4ae54..b5dc19b2 100644 --- a/style/cart/kimplay.less +++ b/style/cart/kimplay.less @@ -170,6 +170,10 @@ #kimplaycart { + .caption a.back.small { + right: -10px; + } + &table { margin-left: 0; }