summaryrefslogtreecommitdiff
path: root/addons/web/static/src/scss
diff options
context:
space:
mode:
authorJulien Mougenot <jum@odoo.com>2019-12-24 08:47:45 +0000
committerJulien Mougenot <jum@odoo.com>2020-01-07 12:49:33 +0000
commit2e861cc8ee39fc2681dd9fb2fe13f45ed2cec5a1 (patch)
treeb340dda8594adeb4675bb6ffa3152b113360ecf5 /addons/web/static/src/scss
parent7e05cff59b511a4535bceee1b1d9103310682ed6 (diff)
[FIX] web: boolean widgets in list views
Before this commit, pointer events were prevented on all checkboxes in readonly list views. That meant that the boolean_toggle widget for instance could not be properly toggled in a non-editable list (which was the purpose of such a widget). Now, pointer events are enabled only if the checkbox : - is in a selected row AND does not have a readonly modifier OR - has a widget applied on the field. Also ensured that the field widgets in the list view multi edition confirmation modal are not interactive. We cannot test the `pointer-events` property interactions as it does not affect manual event triggering used in tests. Task 2154055 closes odoo/odoo#42848 X-original-commit: c7ee164d572e01fcb565001fd5e62fe1278b5cd8 Signed-off-by: Julien Mougenot (JUM) <Arcasias@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/src/scss')
-rw-r--r--addons/web/static/src/scss/list_view.scss18
1 files changed, 14 insertions, 4 deletions
diff --git a/addons/web/static/src/scss/list_view.scss b/addons/web/static/src/scss/list_view.scss
index d6237f0e7ee..951730f1569 100644
--- a/addons/web/static/src/scss/list_view.scss
+++ b/addons/web/static/src/scss/list_view.scss
@@ -206,13 +206,23 @@
width: 32px;
}
- // checkboxes in editable lists should be clickable and activate the row
.o_data_row:not(.o_selected_row) .o_data_cell {
- &.o_toggle_button_cell:not(.o_readonly_modifier) button, // registry: toggle_button
- &.o_boolean_favorite_cell:not(.o_readonly_modifier) .o_favorite, // registry: boolean_favorite
- .custom-checkbox:not(.o_readonly_modifier) {
+
+ // Boolean fields in non-selected rows completely disabled.
+ .custom-checkbox {
pointer-events: none;
}
+
+ // These widgets enable the checkbox if there is no readonly modifier.
+ &.o_boolean_button_cell,
+ &.o_boolean_favorite_cell,
+ &.o_boolean_toggle_cell,
+ &.o_toggle_button_cell {
+
+ &:not(.o_readonly_modifier) .custom-checkbox {
+ pointer-events: auto;
+ }
+ }
}
.o_data_row:not(.o_selected_row) {