[FIX] web: restore odooBounce once again

The odooBounce (previously openerpBounce) function has been fixed many
times over the years. Each time breaking the layout a different way
after the backend was redesigned.

It is time for the proper fix: no more JS animation relying on jQuery,
instead: a CSS animation. Let's try a bouncing outline instead of a
bouncing button for a change.
This commit is contained in:
qsm-odoo
2018-08-22 17:11:31 +02:00
parent 92172d0229
commit a754a77bd8
2 changed files with 20 additions and 2 deletions
+5 -2
View File
@@ -92,8 +92,11 @@ $.fn.extend({
*/
odooBounce: function () {
return this.each(function () {
$(this).css('box-sizing', 'content-box')
.effect('bounce', {distance: 18, times: 5}, 250);
var $el = $(this);
$el.addClass('o_catch_attention');
setTimeout(function () {
$el.removeClass('o_catch_attention');
}, 400);
});
},
/**
+15
View File
@@ -55,3 +55,18 @@
}
}
}
.o_catch_attention {
position: relative;
z-index: 1;
animation: catchAttention 200ms ease 0s infinite normal;
}
@keyframes catchAttention {
0% {
outline: 0px solid fade-out($o-brand-primary, 0.0);
}
100% {
outline: 20px solid fade-out($o-brand-primary, 1.0);
}
}