]> _ Git - fluidbook-html5.git/commitdiff
wip #4024 @0:15
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 30 Oct 2020 13:32:26 +0000 (14:32 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 30 Oct 2020 13:32:26 +0000 (14:32 +0100)
js/libs/fluidbook/cart/fluidbook.cart.mopec.js
js/libs/fluidbook/fluidbook.cart.js

index 82e57f3e67dec9ecba9f9e5c4bf8cc60841d4986..a876dc2f905eeceaeedb80da49e1b044a9183d12 100644 (file)
@@ -340,6 +340,10 @@ FluidbookCartMopec.prototype = {
         return content;
     },
 
+    getTooltipStyle: function () {
+        return 'invert';
+    },
+
     getFormKey: function () {
         return $.cookie('form_key');
     },
index bf7de9f3013799437a886f044a6fc6c0baec3197..194f2d5efa61eae6b448d02b485437ccb327f821 100644 (file)
@@ -26,8 +26,14 @@ FluidbookCart.prototype = {
                 qty = parseInt($(this).attr('data-cart-qty'));
             }
 
+            var tooltipStyle='';
+            try{
+                tooltipStyle= $this.instance.getTooltipStyle();
+            }catch (e){
+
+            }
             if ($this.instance.addToCart($(this).data('cart-ref'), qty)) {
-                $this.fluidbook.tooltip.displayTooltip($this.fluidbook.l10n.__("the item has been added to your cart"), 'invert');
+                $this.fluidbook.tooltip.displayTooltip($this.fluidbook.l10n.__("the item has been added to your cart"),tooltipStyle);
             }
             return false;
         });