[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:
@@ -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);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user