summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/libs/jquery.js
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2018-08-22 15:11:37 +0200
committerqsm-odoo <qsm@odoo.com>2018-08-22 17:11:31 +0200
commita754a77bd84ad678209c78179a6f62dbda69b46e (patch)
tree7b8dc58d25e2f097bed112b0a004dc5bb7aeff94 /addons/web/static/src/js/libs/jquery.js
parent92172d02292a3d18a0d928cf9e5444a90ac4ac5a (diff)
[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.
Diffstat (limited to 'addons/web/static/src/js/libs/jquery.js')
-rw-r--r--addons/web/static/src/js/libs/jquery.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/web/static/src/js/libs/jquery.js b/addons/web/static/src/js/libs/jquery.js
index 4bcab8eb866..77aa9e63c3d 100644
--- a/addons/web/static/src/js/libs/jquery.js
+++ b/addons/web/static/src/js/libs/jquery.js
@@ -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);
});
},
/**