From f209a5d38bb80c253f071e2f0c8579ac4d64fd6b Mon Sep 17 00:00:00 2001 From: Rune Henriksen Date: Thu, 5 Apr 2018 20:32:13 +0200 Subject: [PATCH] added a dismiss-all button to the notification area --- .../ngax/scripts/directives/notificationArea.js | 13 +++++++++++++ .../webroot/ngax/templates/notificationarea.html | 9 ++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Duplicati/Server/webroot/ngax/scripts/directives/notificationArea.js b/Duplicati/Server/webroot/ngax/scripts/directives/notificationArea.js index 8fc6bc70b..6967ae1bd 100644 --- a/Duplicati/Server/webroot/ngax/scripts/directives/notificationArea.js +++ b/Duplicati/Server/webroot/ngax/scripts/directives/notificationArea.js @@ -16,6 +16,19 @@ backupApp.directive('notificationArea', function() { ); }; + $scope.doDismissAll = function() { + angular.forEach($scope.Notifications, function(value, key){ + id = value['ID']; + AppService.delete('/notification/' + id).then( + function() { }, // Don't care, the message will be removed + function(resp) { + // Most likely there was a sync problem, so attempt to reload + NotificationService.refresh_notifications(); + } + ); + }); + }; + $scope.doShowLog = function(backupid) { AppService.get('/backup/' + backupid + '/isactive').then( function() { diff --git a/Duplicati/Server/webroot/ngax/templates/notificationarea.html b/Duplicati/Server/webroot/ngax/templates/notificationarea.html index 3514f3756..c73d4c94b 100644 --- a/Duplicati/Server/webroot/ngax/templates/notificationarea.html +++ b/Duplicati/Server/webroot/ngax/templates/notificationarea.html @@ -33,7 +33,14 @@
- + + +
  • +
    +
    + Dismiss all +
    +