Handle notifications without an eventId

This commit is contained in:
Johannes Zellner
2019-02-06 16:33:57 +01:00
parent 7ec12f487b
commit 640ee55772
2 changed files with 4 additions and 2 deletions
+2 -2
View File
@@ -27,8 +27,8 @@
<br/>
{{ notification.message }}<br/>
<br/>
<h2 ng-show="notification.busyLoadEvent" class="text-center"><i class="fa fa-circle-notch fa-spin"></i></h2>
<pre ng-hide="notification.busyLoadEvent" ng-click="$event.stopPropagation();" style="cursor: auto">{{ notification.event.data | json }}</pre>
<h2 ng-show="notification.eventId && notification.busyLoadEvent" class="text-center"><i class="fa fa-circle-notch fa-spin"></i></h2>
<pre ng-hide="!notification.eventId || notification.busyLoadEvent" ng-click="$event.stopPropagation();" style="cursor: auto">{{ notification.event.data | json }}</pre>
</div>
</div>
</div>
+2
View File
@@ -69,6 +69,8 @@ angular.module('Application').controller('NotificationsController', ['$scope', '
};
$scope.notificationExpanding = function (notification) {
if (!notification.eventId) return;
notification.busyLoadEvent = true;
Client.getEvent(notification.eventId, function (error, result) {