Making changes to implement display queue

This commit is contained in:
Henry 2015-10-13 17:13:24 -07:00
parent b2a09599a0
commit 2ba6f18c59
7 changed files with 33 additions and 6 deletions

View File

@ -1,7 +1,8 @@
<div ng-controller="MessageController"
class="l-message"
title="{{MessageSeverity}}"
ng-class="{'message-severity-info': ngModel.severity===MessageSeverity.INFO,
ng-class="{
'message-severity-info': ngModel.severity===MessageSeverity.INFO,
'message-severity-error': ngModel.severity===MessageSeverity.ERROR,
'message-severity-alert': ngModel.severity===MessageSeverity.ALERT}">
<div class="ui-symbol type-icon message-type"></div>

View File

@ -1,5 +1,8 @@
<div ng-controller="BannerController" ng-show="active.notification"
class="l-message-banner s-message-banner" ng-click="maximize(active.notification)">
class="l-message-banner s-message-banner" ng-class="{
'error': highest.severity===MessageSeverity.ERROR,
'alert': highest.severity===MessageSeverity.ALERT }"
ng-click="maximize(active.notification)">
<span class="banner-elem label">
{{active.notification.title}}
</span>

View File

@ -1,8 +1,12 @@
<span ng-show="notifications.length > 0" class="status block caution"
<span ng-show="notifications.length > 0" class="status block"
ng-class="{
'error': highest.severity===MessageSeverity.ERROR,
'alert': highest.severity===MessageSeverity.ALERT }"
ng-controller="NotificationIndicatorController">
<span class="ui-symbol status-indicator">&#x21;</span>
<span class="ui-symbol status-indicator">&#xe610;</span>
<span class="label">
<a ng-click="showNotificationsList()">{{notifications.length}} Notifications</a>
<a ng-click="showNotificationsList()">{{notifications.length}}
Notifications {{highest.severity}}</a>
</span>
<span class="count">{{notifications.length}}</span>
</span>

View File

@ -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 = {

View File

@ -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());
};
/**

View File

@ -3,6 +3,7 @@
<span class="label">
<a ng-click="newSuccess()">Success</a> |
<a ng-click="newError()">Error</a> |
<a ng-click="newAlert()">Alert</a> |
<a ng-click="newProgress()">Progress</a>
</span>
<span class="count">Notifications</span>

View File

@ -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 = {