[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
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user