mirror of
https://github.com/nasa/openmct.git
synced 2024-12-29 17:38:53 +00:00
Further integration work
This commit is contained in:
parent
8267058487
commit
2b97d61d6c
@ -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">x</a>
|
||||
<a class="banner-elem ui-symbol close" ng-click="dismiss(active.notification)">
|
||||
x</a>
|
||||
</div>
|
||||
</div>
|
@ -27,6 +27,9 @@ define(
|
||||
"use strict";
|
||||
function BannerController($scope, notificationService){
|
||||
$scope.active = notificationService.active;
|
||||
$scope.dismiss = function(notification){
|
||||
notificationService.dismissOrMinimize(notification);
|
||||
}
|
||||
}
|
||||
return BannerController;
|
||||
});
|
@ -5,6 +5,7 @@
|
||||
define(function(){
|
||||
return {
|
||||
SUCCESS: 0,
|
||||
ERROR: 1
|
||||
INFO: 1,
|
||||
ERROR: 2
|
||||
};
|
||||
});
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user