diff --git a/platform/commonUI/dialog/res/templates/message.html b/platform/commonUI/dialog/res/templates/message.html index ee2b60c58f..28bd09cbb1 100644 --- a/platform/commonUI/dialog/res/templates/message.html +++ b/platform/commonUI/dialog/res/templates/message.html @@ -1,7 +1,8 @@
diff --git a/platform/commonUI/general/res/templates/message-banner.html b/platform/commonUI/general/res/templates/message-banner.html index d3d4a71ed5..5f032143b0 100644 --- a/platform/commonUI/general/res/templates/message-banner.html +++ b/platform/commonUI/general/res/templates/message-banner.html @@ -1,5 +1,8 @@
+ class="l-message-banner s-message-banner" ng-class="{ + 'error': highest.severity===MessageSeverity.ERROR, + 'alert': highest.severity===MessageSeverity.ALERT }" + ng-click="maximize(active.notification)"> diff --git a/platform/commonUI/notification/res/notification-indicator.html b/platform/commonUI/notification/res/notification-indicator.html index f0c7ee48bb..79ceb97302 100644 --- a/platform/commonUI/notification/res/notification-indicator.html +++ b/platform/commonUI/notification/res/notification-indicator.html @@ -1,8 +1,12 @@ - - ! + - {{notifications.length}} Notifications + {{notifications.length}} + Notifications {{highest.severity}} {{notifications.length}} \ No newline at end of file diff --git a/platform/commonUI/notification/src/NotificationIndicatorController.js b/platform/commonUI/notification/src/NotificationIndicatorController.js index ae417b1ba7..9571b0f6a4 100644 --- a/platform/commonUI/notification/src/NotificationIndicatorController.js +++ b/platform/commonUI/notification/src/NotificationIndicatorController.js @@ -28,6 +28,9 @@ define( function NotificationIndicatorController($scope, notificationService, dialogService) { $scope.notifications = notificationService.notifications; + $scope.highest = notificationService.highest; + $scope.MessageSeverity = MessageSeverity; + $scope.showNotificationsList = function(){ var model = { diff --git a/platform/commonUI/notification/src/NotificationService.js b/platform/commonUI/notification/src/NotificationService.js index cadbea29f2..00457f959d 100644 --- a/platform/commonUI/notification/src/NotificationService.js +++ b/platform/commonUI/notification/src/NotificationService.js @@ -254,8 +254,8 @@ define( var index = this.notifications.indexOf(notification); if (index >= 0) { this.notifications.splice(index, 1); - this.setActiveNotification(this.selectNextNotification()); } + this.setActiveNotification(this.selectNextNotification()); }; /** diff --git a/testing/dialogTest/res/notification-launch.html b/testing/dialogTest/res/notification-launch.html index 73bc7c524f..e9b7e8f84e 100644 --- a/testing/dialogTest/res/notification-launch.html +++ b/testing/dialogTest/res/notification-launch.html @@ -3,6 +3,7 @@ Success | Error | + Alert | Progress Notifications diff --git a/testing/dialogTest/src/NotificationLaunchController.js b/testing/dialogTest/src/NotificationLaunchController.js index ccd2543252..14709579b3 100644 --- a/testing/dialogTest/src/NotificationLaunchController.js +++ b/testing/dialogTest/src/NotificationLaunchController.js @@ -96,6 +96,21 @@ define( actions: getExampleActions()}); }; + $scope.newAlert = function(){ + + notificationService.notify({ + title: "Error notification " + messageCounter++ + "!", + hint: "An error has occurred", + severity: MessageSeverity.ALERT, + primaryAction: { + label: 'Retry', + action: function() { + console.log('Retry clicked'); + } + }, + actions: getExampleActions()}); + }; + $scope.newProgress = function(){ var notification = {