stop notification click event propagation
This commit is contained in:
@@ -44,9 +44,11 @@ angular.module('Application').controller('NotificationsController', ['$scope', '
|
||||
$scope.notifications.activeNotification = notification;
|
||||
},
|
||||
|
||||
ack: function (notification, callback) {
|
||||
ack: function (notification, event, callback) {
|
||||
callback = callback || function (error) { if (error) console.error(error); };
|
||||
|
||||
if (event) event.stopPropagation();
|
||||
|
||||
Client.ackNotification(notification.id, function (error) {
|
||||
if (error) return callback(error);
|
||||
|
||||
@@ -66,7 +68,7 @@ angular.module('Application').controller('NotificationsController', ['$scope', '
|
||||
|
||||
asyncForEach($scope.notifications.notifications, function (notification, callback) {
|
||||
if (notification.acknowledged) return callback();
|
||||
$scope.notifications.ack(notification, callback);
|
||||
$scope.notifications.ack(notification, null /* no click event */, callback);
|
||||
}, function (error) {
|
||||
if (error) console.error(error);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user