[FIX] calendar: ok button on notifications should notify ack
Have an event starting *now* with a reminder, let's say 15 minutes After saving the event, the notification pops up. Click "OK" Before this commit no call to the server was done, implying that the notification will keep on popping up untimely This was because, the widget was destroyed, hence its parents got removed before the triggering up of rpc call After this commit, we make sure we destroy the widget *after* the rpc OPW 1860169 closes #25399
This commit is contained in:
@@ -40,8 +40,10 @@ var CalendarNotification = Notification.extend({
|
||||
},
|
||||
|
||||
'click .link2showed': function() {
|
||||
this.destroy(true);
|
||||
this._rpc({route: '/calendar/notify_ack'});
|
||||
var self = this;
|
||||
this._rpc({route: '/calendar/notify_ack'}).always(function() {
|
||||
self.destroy();
|
||||
});
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user