mirror of
https://github.com/nasa/openmct.git
synced 2025-01-17 10:20:27 +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">
|
class="l-message-banner s-message-banner">
|
||||||
<span class="banner-elem label">
|
<span class="banner-elem label">
|
||||||
{{active.notification.title}}
|
{{active.notification.title}}
|
||||||
</span><mct-include key="'progress-bar'"
|
</span>
|
||||||
class="banner-elem"
|
<span ng-hide="active.notification.progress === undefined">
|
||||||
ng-model="ngModel"
|
<mct-include key="'progress-bar'" class="banner-elem"
|
||||||
ng-hide-x="ngModel.dialog.progress === undefined">
|
ng-model="ngModel">
|
||||||
|
</mct-include>
|
||||||
</mct-include>
|
</span>
|
||||||
<a ng-hide="active.notification.progress === undefined"
|
<a ng-hide="active.notification.primaryAction === undefined"
|
||||||
class="banner-elem l-action s-action">
|
class="banner-elem l-action s-action"
|
||||||
Try Again
|
ng-click="active.notification.primaryAction.action">
|
||||||
|
{{active.notification.primaryAction.label}}
|
||||||
</a>
|
</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>
|
||||||
</div>
|
</div>
|
@ -27,6 +27,9 @@ define(
|
|||||||
"use strict";
|
"use strict";
|
||||||
function BannerController($scope, notificationService){
|
function BannerController($scope, notificationService){
|
||||||
$scope.active = notificationService.active;
|
$scope.active = notificationService.active;
|
||||||
|
$scope.dismiss = function(notification){
|
||||||
|
notificationService.dismissOrMinimize(notification);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return BannerController;
|
return BannerController;
|
||||||
});
|
});
|
@ -5,6 +5,7 @@
|
|||||||
define(function(){
|
define(function(){
|
||||||
return {
|
return {
|
||||||
SUCCESS: 0,
|
SUCCESS: 0,
|
||||||
ERROR: 1
|
INFO: 1,
|
||||||
|
ERROR: 2
|
||||||
};
|
};
|
||||||
});
|
});
|
@ -112,6 +112,7 @@ define(
|
|||||||
*/
|
*/
|
||||||
NotificationService.prototype.success = function (notification) {
|
NotificationService.prototype.success = function (notification) {
|
||||||
notification.autoDismiss = notification.autoDismiss || true;
|
notification.autoDismiss = notification.autoDismiss || true;
|
||||||
|
notification.severity = MessageSeverity.SUCCESS;
|
||||||
this.notify(notification);
|
this.notify(notification);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -206,7 +207,7 @@ define(
|
|||||||
notification = this.notifications[i];
|
notification = this.notifications[i];
|
||||||
|
|
||||||
if (!notification.minimized
|
if (!notification.minimized
|
||||||
&& notification!== this.activeNotification) {
|
&& notification!== this.active.notification) {
|
||||||
|
|
||||||
return notification;
|
return notification;
|
||||||
}
|
}
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
[],
|
['../../../platform/commonUI/notification/src/MessageSeverity'],
|
||||||
function () {
|
function (MessageSeverity) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function NotificationLaunchController($scope, notificationService) {
|
function NotificationLaunchController($scope, notificationService) {
|
||||||
@ -38,6 +38,28 @@ define(
|
|||||||
title: "Success notification!"
|
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;
|
return NotificationLaunchController;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user