[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#61275 X-original-commit: fab31e378d2069ff6f2bd18365de2f116a43b872 Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -290,6 +290,12 @@ const UserValueWidget = Widget.extend({
|
||||
this.el.classList.remove('o_we_widget_opened');
|
||||
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}
|
||||
@@ -728,6 +734,17 @@ const CheckboxUserValueWidget = ButtonUserValueWidget.extend({
|
||||
return this._super(...arguments);
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Public
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
enable() {
|
||||
this.$('we-checkbox').click();
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Handlers
|
||||
//--------------------------------------------------------------------------
|
||||
@@ -3685,7 +3702,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();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
@@ -797,7 +797,7 @@ snippetOptions.registry.OptionsTab = snippetOptions.SnippetOptionWidget.extend({
|
||||
// TODO improve: hack to click on external image picker
|
||||
this.bodyImageType = widgetValue;
|
||||
const widget = this._requestUserValueWidgets(params.imagepicker)[0];
|
||||
widget.$el.click();
|
||||
widget.enable();
|
||||
},
|
||||
/**
|
||||
* @override
|
||||
@@ -1696,7 +1696,7 @@ snippetOptions.registry.Parallax = snippetOptions.SnippetOptionWidget.extend({
|
||||
// The parallax option was enabled but the background image was
|
||||
// removed: disable the parallax option.
|
||||
const widget = this._requestUserValueWidgets('parallax_none_opt')[0];
|
||||
widget.$el.click();
|
||||
widget.enable();
|
||||
widget.getParent().close(); // FIXME remove this ugly hack asap
|
||||
}
|
||||
},
|
||||
@@ -1842,7 +1842,7 @@ const VisibilityPageOptionUpdate = snippetOptions.SnippetOptionWidget.extend({
|
||||
// toggled (otherwise it would be about editing an element which
|
||||
// is actually never displayed on the page).
|
||||
const widget = this._requestUserValueWidgets(this.showOptionWidgetName)[0];
|
||||
widget.$el.click();
|
||||
widget.enable();
|
||||
},
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user