added a dismiss-all button to the notification area
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -33,7 +33,14 @@
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li class="error" ng-if="Notifications.length > 0">
|
||||
<div class="content">
|
||||
<div class="buttons">
|
||||
<a href ng-click="doDismissAll()" class="button dismiss" translate>Dismiss all</a>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
Reference in New Issue
Block a user