From bdfddace29b16404c06a7ebfc0cc242463a0e768 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 29 Oct 2020 17:01:00 +0000 Subject: [FIX] web_editor, *: ease understanding of snippet drag, not click *: web, website Make the empty oe_structure messages "wizz" when the user clicks on a snippet to drag instead of dragging it. Part of https://github.com/odoo/odoo/pull/60837 Related to task-2363616 closes odoo/odoo#60837 Signed-off-by: Quentin Smetz (qsm) --- addons/web/static/src/js/libs/jquery.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'addons/web/static/src/js/libs') diff --git a/addons/web/static/src/js/libs/jquery.js b/addons/web/static/src/js/libs/jquery.js index 7c3273abc91..471d07bb980 100644 --- a/addons/web/static/src/js/libs/jquery.js +++ b/addons/web/static/src/js/libs/jquery.js @@ -92,15 +92,15 @@ $.fn.extend({ }, /** * Makes DOM elements bounce the way Odoo decided it. + * + * @param {string} [extraClass] */ - odooBounce: function () { - return this.each(function () { - var $el = $(this); - $el.addClass('o_catch_attention'); - setTimeout(function () { - $el.removeClass('o_catch_attention'); - }, 400); - }); + odooBounce: function (extraClass) { + for (const el of this) { + el.classList.add('o_catch_attention', extraClass); + setTimeout(() => el.classList.remove('o_catch_attention', extraClass), 400); + } + return this; }, /** * Allows to bind events to a handler just as the standard `$.on` function -- cgit v1.2.3