diff options
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.options.js | 15 | ||||
| -rw-r--r-- | addons/web_editor/static/src/scss/wysiwyg_snippets.scss | 10 |
2 files changed, 23 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/editor/snippets.options.js b/addons/web_editor/static/src/js/editor/snippets.options.js index d8887d67095..14bc101290f 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -705,6 +705,21 @@ const CheckboxUserValueWidget = ButtonUserValueWidget.extend({ return this._super(...arguments); }, + + //-------------------------------------------------------------------------- + // Handlers + //-------------------------------------------------------------------------- + + /** + * @override + */ + _onButtonClick(ev) { + if (!ev.target.closest('we-title, we-checkbox')) { + // Only consider clicks on the label and the checkbox control itself + return; + } + return this._super(...arguments); + }, }); const BaseSelectionUserValueWidget = UserValueWidget.extend({ diff --git a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss index ef54977e7da..b7e598c6662 100644 --- a/addons/web_editor/static/src/scss/wysiwyg_snippets.scss +++ b/addons/web_editor/static/src/scss/wysiwyg_snippets.scss @@ -671,13 +671,16 @@ body.editor_enable.editor_has_snippets { padding: 0; border: none; background: none; + cursor: default; + > we-title { + cursor: pointer; + } > div { display: flex; min-height: $o-we-sidebar-content-field-height; line-height: $o-we-sidebar-content-field-height; } - we-checkbox { flex: 0 0 auto; display: flex; @@ -686,6 +689,7 @@ body.editor_enable.editor_has_snippets { height: $o-we-sidebar-content-field-toggle-height; background-color: $o-we-sidebar-content-field-toggle-bg; border-radius: 10rem; + cursor: pointer; &::after { content: ""; @@ -697,11 +701,13 @@ body.editor_enable.editor_has_snippets { box-shadow: $o-we-sidebar-content-field-toggle-control-shadow; } } - &.active we-checkbox { background-color: $o-we-sidebar-content-field-toggle-active-bg; justify-content: flex-end; } + &.active, &:hover { + color: $o-we-sidebar-content-field-clickable-color; + } } // Selection (select and button groups) |
