[REF] website, *: replace legacy dialog with OWL Dialog

*: test_website, web_editor, website_sale

The goal of this commit is to replace all Dialog in the Website Editor
flow with OWL Dialog. This uses the new `bindService` and `call` methods
available on legacy widgets. The replacements mainly use the
ConfirmationDialog component, but some had to have custom-made dialogs.

closes odoo/odoo#138947

Signed-off-by: Francois Georis (fge) <fge@odoo.com>
This commit is contained in:
Arthur Detroux (ard)
2023-10-30 17:48:42 +00:00
parent 0997b0a401
commit 57ed8bc0bf
10 changed files with 461 additions and 464 deletions
@@ -7,14 +7,17 @@
// world !' message in a popup:
//
/*
import Dialog from '@web/legacy/js/core/dialog';
import { ConfirmationDialog } from '@web/core/confirmation_dialog/confirmation_dialog';
import publicWidget from '@web/legacy/js/public/public_widget';
publicWidget.registry.HelloWorldPopup = publicWidget.Widget.extend({
selector: '#wrapwrap',
start: function () {
Dialog.alert(this, "Hello, world!");
init() {
this.dialog = this.bindService("dialog");
},
start() {
this.dialog.add(ConfirmationDialog, { body: 'Hello World' });
return this._super.apply(this, arguments);
},
});