summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2012-12-04 17:23:54 +0100
committerXavier Morel <xmo@openerp.com>2012-12-04 17:23:54 +0100
commitae53b85d90fe3e1644d0f44d49bae75f38e95709 (patch)
tree65ef53c7071cf3ac75c09780d6edc871c5f88fb7 /addons/web/static/src/js
parentb624267457f8d0c8a0db6ddc554f29409666ee88 (diff)
[FIX] clicks toggling @readonly radio buttons
bzr revid: xmo@openerp.com-20121204162354-6c4z8lvah683c5qx
Diffstat (limited to 'addons/web/static/src/js')
-rw-r--r--addons/web/static/src/js/view_list.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js
index 4f1ed0a2317..671b076451c 100644
--- a/addons/web/static/src/js/view_list.js
+++ b/addons/web/static/src/js/view_list.js
@@ -923,6 +923,18 @@ instance.web.ListView.List = instance.web.Class.extend( /** @lends instance.web.
}, this);
this.$current = $('<tbody>')
+ .delegate('input[readonly=readonly]', 'click', function (e) {
+ /*
+ Against all logic and sense, as of right now @readonly
+ apparently does nothing on checkbox and radio inputs, so
+ the trick of using @readonly to have, well, readonly
+ checkboxes (which still let clicks go through) does not
+ work out of the box. We *still* need to preventDefault()
+ on the event, otherwise the checkbox's state *will* toggle
+ on click
+ */
+ e.preventDefault();
+ })
.delegate('th.oe_list_record_selector', 'click', function (e) {
e.stopPropagation();
var selection = self.get_selection();