diff options
| author | Christophe Matthieu <chm@odoo.com> | 2018-10-10 11:18:03 +0200 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2018-10-10 16:29:28 +0200 |
| commit | 4aec0b7740bd57249d504616345ece90fb31c524 (patch) | |
| tree | e9e0adb9d21c7bbd61b2737b23dedc2bf60bd2e6 /addons/web/static/src/js/services | |
| parent | f9a16f7bf5b8b8801582233ba54979af8114a846 (diff) | |
[FIX] calendar: notifications may appear
Following the transformation into notification service, performed by
commit 07cd24b1ecf3ab8edd3fffbf2fcd3a3e685f357c, calendar has been
forgotten.
Diffstat (limited to 'addons/web/static/src/js/services')
| -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 bbeeca51bb8..7575dcd8160 100644 --- a/addons/web/static/src/js/services/notification_service.js +++ b/addons/web/static/src/js/services/notification_service.js @@ -56,6 +56,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' @@ -76,7 +78,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; }, |
