diff options
| author | qsm-odoo <qsm@odoo.com> | 2017-07-28 10:32:00 +0200 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2017-08-03 10:50:55 +0200 |
| commit | 6d4900826b14e6b6fb252bc6c539737cf04281a1 (patch) | |
| tree | 5364b0e1de3bde70842954bd8d11606ca97ec0d5 /addons/web/static/src/js/libs/jquery.js | |
| parent | 847afa1b697a5c326e95232ad1490e982ff4f0ff (diff) | |
[REF] web, *: improve behavior of jQuery extension 'prependEvent'
* web_editor
Odoo extends jQuery to add some utility functions. The 'prependEvent'
one add the possibility to add an event handler on an element (like
the jQuery built-in 'on' function) but to be executed before the
already binded ones.
This function was however incomplete and did not allow to use jQuery
namespaced events.
Diffstat (limited to 'addons/web/static/src/js/libs/jquery.js')
| -rw-r--r-- | addons/web/static/src/js/libs/jquery.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/src/js/libs/jquery.js b/addons/web/static/src/js/libs/jquery.js index 8722025663e..30afa4db274 100644 --- a/addons/web/static/src/js/libs/jquery.js +++ b/addons/web/static/src/js/libs/jquery.js @@ -110,7 +110,8 @@ $.fn.extend({ events = events.split(' '); return this.each(function () { var el = this; - _.each(events, function (evName) { + _.each(events, function (evNameNamespaced) { + var evName = evNameNamespaced.split('.')[0]; var handler = $._data(el, 'events')[evName].pop(); $._data(el, 'events')[evName].unshift(handler); }); |
