diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-10-29 17:01:00 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-11-13 13:56:18 +0000 |
| commit | bdfddace29b16404c06a7ebfc0cc242463a0e768 (patch) | |
| tree | c16b565a3fa6fa92c82f3df2531cbef00f1e6c9f /addons/web/static/src/js/libs | |
| parent | 3ed3537abd416ebc35f8bc2ee65f209840c071bf (diff) | |
[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) <qsm@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/libs')
| -rw-r--r-- | addons/web/static/src/js/libs/jquery.js | 16 |
1 files changed, 8 insertions, 8 deletions
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 |
