diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-10-22 15:39:05 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-10-22 16:59:51 +0200 |
| commit | b81c2bce846c94b5695d680ebbc30f1cfe51e614 (patch) | |
| tree | 385190eb54adfbcdf8ff437d2cc667ddd1013718 /addons/web/static/src/js/services/notification_service.js | |
| parent | 933165ec3afa0676de4b2f3662c4c1bb2f97efc5 (diff) | |
| parent | 3c108977c1e7d9361894c38bcd253030e8097479 (diff) | |
[MERGE] forward port branch saas-11.4 up to 3c108977c1e
Diffstat (limited to 'addons/web/static/src/js/services/notification_service.js')
| -rw-r--r-- | addons/web/static/src/js/services/notification_service.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/addons/web/static/src/js/services/notification_service.js b/addons/web/static/src/js/services/notification_service.js index cc87305a6a2..a0d2720604b 100644 --- a/addons/web/static/src/js/services/notification_service.js +++ b/addons/web/static/src/js/services/notification_service.js @@ -58,6 +58,8 @@ var NotificationService = AbstractService.extend({ * Note that this method does not wait for the appendTo method to complete. * * @param {Object} params + * @param {function} [params.Notification] javascript class of a notification + * to instantiate by default use 'web.Notification' * @param {string} params.title notification title * @param {string} params.message notification main message * @param {string} params.type 'notification' or 'warning' @@ -78,7 +80,8 @@ var NotificationService = AbstractService.extend({ this.$el = $('<div class="o_notification_manager"/>'); this.$el.prependTo('body'); } - var notification = this.notifications[++id] = new Notification(this, params); + var NotificationWidget = params.Notification || Notification; + var notification = this.notifications[++id] = new NotificationWidget(this, params); notification.appendTo(this.$el); return id; }, |
