diff options
| author | Xavier Morel <xmo@openerp.com> | 2012-11-13 14:18:06 +0100 |
|---|---|---|
| committer | Xavier Morel <xmo@openerp.com> | 2012-11-13 14:18:06 +0100 |
| commit | 9fcde051685d49dc6e1cc7fc6c9b90c8efe5974b (patch) | |
| tree | 009cfa2cbc661e7250d5d415193ad9d1fead2727 /addons/web/static | |
| parent | a379a62d88aafc4f1f4b5701b58bbc85909115bf (diff) | |
[FIX] clicking on checkbox (boolean field) of list view should correctly trigger whatever the row action is
replaced @disabled checkboxes for boolean fields by @readonly + alpha
(50%), as disabled input do not generate *any* event. Not default
action (of course) but not e.g. a click either, whether delegated or
bound directly on the element, there's no way at all to see if e.g. a
user has clicked on a disabled checkbox or radio.
lp bug: https://launchpad.net/bugs/1013569 fixed
bzr revid: xmo@openerp.com-20121113131806-7fhog1f96gxnjr67
Diffstat (limited to 'addons/web/static')
| -rw-r--r-- | addons/web/static/src/css/base.css | 4 | ||||
| -rw-r--r-- | addons/web/static/src/css/base.sass | 2 | ||||
| -rw-r--r-- | addons/web/static/src/js/view_list.js | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/addons/web/static/src/css/base.css b/addons/web/static/src/css/base.css index 2c3150188db..c43e98a174a 100644 --- a/addons/web/static/src/css/base.css +++ b/addons/web/static/src/css/base.css @@ -2731,6 +2731,10 @@ .openerp .oe_list_content > tbody > tr > td.oe_list_checkbox:first-child:after, .openerp .oe_list_content > tbody > tr th.oe_list_checkbox:first-child:after { border-width: 0; } +.openerp .oe_list_content > tbody > tr > td.oe_list_field_boolean input { + filter: alpha(opacity=50); + opacity: 0.5; +} .openerp .oe_list_content > tbody > tr:nth-child(odd) { background-color: #f0f0fa; background-color: #f0f0fa; diff --git a/addons/web/static/src/css/base.sass b/addons/web/static/src/css/base.sass index 07f5c3eb666..e201bf94b9b 100644 --- a/addons/web/static/src/css/base.sass +++ b/addons/web/static/src/css/base.sass @@ -2165,6 +2165,8 @@ $sheet-padding: 16px width: 17px &:after border-width: 0 + > td.oe_list_field_boolean input + @include opacity() > tr:nth-child(odd) background-color: #f0f0fa @include vertical-gradient(#f0f0fa, #eeeef6) diff --git a/addons/web/static/src/js/view_list.js b/addons/web/static/src/js/view_list.js index 321faf40c0f..700c126d68d 100644 --- a/addons/web/static/src/js/view_list.js +++ b/addons/web/static/src/js/view_list.js @@ -2156,7 +2156,7 @@ instance.web.list.Boolean = instance.web.list.Column.extend({ * @private */ _format: function (row_data, options) { - return _.str.sprintf('<input type="checkbox" %s disabled="disabled"/>', + return _.str.sprintf('<input type="checkbox" %s readonly="readonly"/>', row_data[this.id].value ? 'checked="checked"' : ''); } }); |
