summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorLucas Perais (lpe) <lpe@odoo.com>2018-04-18 10:44:01 +0200
committerLucas Perais (lpe) <lpe@odoo.com>2018-05-02 09:52:50 +0200
commit2f5e44d40b35ea6790a5e10223273c0cbe900c87 (patch)
tree2f37c9cf7d001311cdfd896e9137b3d2f9a2cea6 /addons/web/static/src
parenta21db141d4af26fc0b44ec390005db3bc5aa17e6 (diff)
[FIX] web: checkbox in editable list are clickable
Having boolean checkbox in an editable list Before this commit, the checkbox was disabled, thus not clickable The user, who probably expects to click on it to tick/untick was thus misled, and needed to click *outside* the checkbox in order to activate the row and only then tick the checkbox After this commit, the behavior is as expected from the editable list point of view clicking anywhere in the row (inlcuding on the checkbox itself) activates it into editable mode OPW 1836067 closes #24292
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/list/list_editable_renderer.js7
-rw-r--r--addons/web/static/src/less/list_view.less8
2 files changed, 14 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/list/list_editable_renderer.js b/addons/web/static/src/js/views/list/list_editable_renderer.js
index 64cfa8a1f30..09908212237 100644
--- a/addons/web/static/src/js/views/list/list_editable_renderer.js
+++ b/addons/web/static/src/js/views/list/list_editable_renderer.js
@@ -531,8 +531,13 @@ ListRenderer.include({
* @returns {Deferred} this deferred is resolved immediately
*/
_renderView: function () {
+ var self = this;
this.currentRow = null;
- return this._super.apply(this, arguments);
+ return this._super.apply(this, arguments).then(function () {
+ if (self._isEditable()) {
+ self.$('table').addClass('o_editable_list');
+ }
+ });
},
/**
* Force the resequencing of the items in the list.
diff --git a/addons/web/static/src/less/list_view.less b/addons/web/static/src/less/list_view.less
index 874e809071b..1b1c57b339f 100644
--- a/addons/web/static/src/less/list_view.less
+++ b/addons/web/static/src/less/list_view.less
@@ -6,6 +6,14 @@
background-color: @odoo-view-background-color;
margin-bottom: 0px;
+ // Checkbox in editable list
+ // should be clickable and activate the row
+ &.o_editable_list .o_data_row:not(.o_selected_row) .o_data_cell {
+ .o_checkbox:not(.o_readonly_modifier) {
+ pointer-events: none;
+ }
+ }
+
&.table {
td, th {
vertical-align: middle;