[FIX] website_sale: show empty cart icon before starting animation
On clicking "add to cart" button, there is a simple animation of product image moving to the cart icon. However, if the cart icon is hidden because of disabled option "Show Empty Cart", the animation is broken: the image is moving to left corner of the navbar. Fix it by showing cart icon before starting the animation. opw-3078396 closes odoo/odoo#107760 X-original-commit: 6110b993ce63356e1b5b900f7bacb2afa648f6ad Signed-off-by: William Braeckman (wbr) <wbr@odoo.com> Signed-off-by: Ivan Elizaryev (iel) <iel@odoo.com>
This commit is contained in:
@@ -50,7 +50,7 @@ function animateClone($cart, $elem, offsetTop, offsetLeft) {
|
||||
if (!$cart.length) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
$cart.find('.o_animate_blink').addClass('o_red_highlight o_shadow_animation').delay(500).queue(function () {
|
||||
$cart.removeClass('d-none').find('.o_animate_blink').addClass('o_red_highlight o_shadow_animation').delay(500).queue(function () {
|
||||
$(this).removeClass("o_shadow_animation").dequeue();
|
||||
}).delay(2000).queue(function () {
|
||||
$(this).removeClass("o_red_highlight").dequeue();
|
||||
|
||||
Reference in New Issue
Block a user