blob: 27055cd7b7751166c3bdb9f6b364c160e4c94be4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
odoo.define('mail/static/src/widgets/notification_alert/notification_alert.js', function (require) {
"use strict";
const components = {
NotificationAlert: require('mail/static/src/components/notification_alert/notification_alert.js'),
};
const { ComponentWrapper, WidgetAdapterMixin } = require('web.OwlCompatibility');
const Widget = require('web.Widget');
const widgetRegistry = require('web.widget_registry');
class NotificationAlertWrapper extends ComponentWrapper {}
// -----------------------------------------------------------------------------
// Display Notification alert on user preferences form view
// -----------------------------------------------------------------------------
const NotificationAlert = Widget.extend(WidgetAdapterMixin, {
/**
* @override
*/
init() {
this._super(...arguments);
this.component = undefined;
},
/**
* @override
*/
async start() {
await this._super(...arguments);
this.component = new NotificationAlertWrapper(
this,
components.NotificationAlert,
{}
);
await this.component.mount(this.el);
},
});
widgetRegistry.add('notification_alert', NotificationAlert);
return NotificationAlert;
});
|