From 4aec0b7740bd57249d504616345ece90fb31c524 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Wed, 10 Oct 2018 11:18:03 +0200 Subject: [FIX] calendar: notifications may appear Following the transformation into notification service, performed by commit 07cd24b1ecf3ab8edd3fffbf2fcd3a3e685f357c, calendar has been forgotten. --- addons/web/static/src/js/services/notification_service.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/services') 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 = $('
'); 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; }, -- cgit v1.2.3