Further integration work

This commit is contained in:
Henry 2015-10-09 10:59:36 -07:00
parent 8267058487
commit 2b97d61d6c
5 changed files with 43 additions and 14 deletions

View File

@ -3,16 +3,18 @@
class="l-message-banner s-message-banner">
<span class="banner-elem label">
{{active.notification.title}}
</span><mct-include key="'progress-bar'"
class="banner-elem"
ng-model="ngModel"
ng-hide-x="ngModel.dialog.progress === undefined">
</mct-include>
<a ng-hide="active.notification.progress === undefined"
class="banner-elem l-action s-action">
Try Again
</span>
<span ng-hide="active.notification.progress === undefined">
<mct-include key="'progress-bar'" class="banner-elem"
ng-model="ngModel">
</mct-include>
</span>
<a ng-hide="active.notification.primaryAction === undefined"
class="banner-elem l-action s-action"
ng-click="active.notification.primaryAction.action">
{{active.notification.primaryAction.label}}
</a>
<a class="banner-elem ui-symbol close">&#x78;</a>
<a class="banner-elem ui-symbol close" ng-click="dismiss(active.notification)">
&#x78;</a>
</div>
</div>

View File

@ -27,6 +27,9 @@ define(
"use strict";
function BannerController($scope, notificationService){
$scope.active = notificationService.active;
$scope.dismiss = function(notification){
notificationService.dismissOrMinimize(notification);
}
}
return BannerController;
});

View File

@ -5,6 +5,7 @@
define(function(){
return {
SUCCESS: 0,
ERROR: 1
INFO: 1,
ERROR: 2
};
});

View File

@ -112,6 +112,7 @@ define(
*/
NotificationService.prototype.success = function (notification) {
notification.autoDismiss = notification.autoDismiss || true;
notification.severity = MessageSeverity.SUCCESS;
this.notify(notification);
};
@ -206,7 +207,7 @@ define(
notification = this.notifications[i];
if (!notification.minimized
&& notification!== this.activeNotification) {
&& notification!== this.active.notification) {
return notification;
}

View File

@ -22,8 +22,8 @@
/*global define*/
define(
[],
function () {
['../../../platform/commonUI/notification/src/MessageSeverity'],
function (MessageSeverity) {
"use strict";
function NotificationLaunchController($scope, notificationService) {
@ -38,6 +38,28 @@ define(
title: "Success notification!"
})
};
$scope.newError = function(){
notificationService.notify({
title: "Error notification!",
severity: MessageSeverity.ERROR
})
};
$scope.newProgress = function(){
var notification = {
title: "Progress notification!",
severity: MessageSeverity.INFO,
progress: 0,
progressUnknown: true
};
notificationService.notify(notification)
};
}
return NotificationLaunchController;
}