[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:
+5
-2
@@ -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);
|
||||
});
|
||||
},
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user