diff options
| author | xO-Tx <mou@odoo.com> | 2020-10-29 18:13:27 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-11-03 12:37:24 +0000 |
| commit | fab31e378d2069ff6f2bd18365de2f116a43b872 (patch) | |
| tree | 0db522f2c01736a4b140a7c0fb16519c59e1b2c2 /addons/web_editor | |
| parent | 5488916657f9cd4041abdcbe3fc615174df6cb49 (diff) | |
[FIX] web_editor, website: restore footer visibility option
Making the footer visible after having made it disappear was not
possible anymore because of [1].
Part of https://github.com/odoo/odoo/pull/59624
task-2312878
[1]: https://github.com/odoo/odoo/commit/61ffe97d03deae0aee72568311c453d1cd3470c8
closes odoo/odoo#59624
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Diffstat (limited to 'addons/web_editor')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.options.js | 19 |
1 files changed, 18 insertions, 1 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 d2935b8ccac..58d4158608c 100644 --- a/addons/web_editor/static/src/js/editor/snippets.options.js +++ b/addons/web_editor/static/src/js/editor/snippets.options.js @@ -277,6 +277,12 @@ const UserValueWidget = Widget.extend({ this._userValueWidgets.forEach(widget => widget.close()); }, /** + * Simulates the correct event on the element to make it active. + */ + enable() { + this.$el.click(); + }, + /** * @param {string} name * @returns {UserValueWidget|null} */ @@ -715,6 +721,17 @@ const CheckboxUserValueWidget = ButtonUserValueWidget.extend({ }, //-------------------------------------------------------------------------- + // Public + //-------------------------------------------------------------------------- + + /** + * @override + */ + enable() { + this.$('we-checkbox').click(); + }, + + //-------------------------------------------------------------------------- // Handlers //-------------------------------------------------------------------------- @@ -3619,7 +3636,7 @@ registry.BackgroundToggler = SnippetOptionWidget.extend({ // image: remove the background filter option. // TODO there probably is a better system to implement to do that const widget = this._requestUserValueWidgets('bg_filter_toggle_opt')[0]; - widget.$el.click(); + widget.enable(); } }, }); |
