From d09ac5bcc66daa874bc80e3725f9438d521e8e96 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Thu, 28 Feb 2019 15:56:19 +0100 Subject: [PATCH] stop notification click event propagation --- src/views/notifications.html | 2 +- src/views/notifications.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/notifications.html b/src/views/notifications.html index 1c70c5b6c..7998b15cc 100644 --- a/src/views/notifications.html +++ b/src/views/notifications.html @@ -21,7 +21,7 @@
{{ notification.title }} {{ notification.creationTime | prettyDate }} - +

diff --git a/src/views/notifications.js b/src/views/notifications.js index f084391c2..23cab4b2b 100644 --- a/src/views/notifications.js +++ b/src/views/notifications.js @@ -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);