diff options
| author | David Monjoie <dmo@odoo.com> | 2017-05-05 16:34:54 +0200 |
|---|---|---|
| committer | David Monjoie <dmo@odoo.com> | 2017-05-10 15:20:03 +0200 |
| commit | e1edd62320fef4991ba9554ee197021b45987a60 (patch) | |
| tree | 789c87279d7b49025560d38ef53c7939a2fe28cd /addons/web/static/src/js/fields/abstract_field.js | |
| parent | ec3baa60274b8271c74ab9f64cdb35a15105379f (diff) | |
[FIX] web: toggle checkboxes when clicked in editable list view
Previously, the checkbox was not checked when it was clicked in
editable list view, it only opened the row but did not check the
checkbox.
Diffstat (limited to 'addons/web/static/src/js/fields/abstract_field.js')
| -rw-r--r-- | addons/web/static/src/js/fields/abstract_field.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/addons/web/static/src/js/fields/abstract_field.js b/addons/web/static/src/js/fields/abstract_field.js index 7278e45dedb..725a237750d 100644 --- a/addons/web/static/src/js/fields/abstract_field.js +++ b/addons/web/static/src/js/fields/abstract_field.js @@ -168,18 +168,20 @@ var AbstractField = Widget.extend({ * part can be disabled. In that case, note that the focused input/textarea * will have the cursor at the very end. * - * @param {boolean} [noselect=false] if false and the input is of type text - * or textarea, the content will also be selected + * @param {Object} [options] + * @param {boolean} [noselect=false] if false and the input + * is of type text or textarea, the content will also be selected + * @param {Event} [options.event] the event which fired this activation * @returns {boolean} true if the widget was activated, false if the * focusable element was not found or invisible */ - activate: function (noselect) { + activate: function (options) { var $focusable = this.getFocusableElement(); if ($focusable.length && $focusable.is(':visible')) { $focusable.focus(); if ($focusable.is('input[type="text"], textarea')) { $focusable[0].selectionStart = $focusable[0].selectionEnd = $focusable[0].value.length; - if (!noselect) { + if (options && !options.noselect) { $focusable.select(); } } |
