mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 22:58:14 +00:00
Fixed failing tests, and added stopPropagation to prevent maximizing of notifications on action click or dismiss
This commit is contained in:
@ -5,12 +5,12 @@
|
|||||||
"platform/commonUI/about",
|
"platform/commonUI/about",
|
||||||
"platform/commonUI/browse",
|
"platform/commonUI/browse",
|
||||||
"platform/commonUI/edit",
|
"platform/commonUI/edit",
|
||||||
"platform/commonUI/notification",
|
|
||||||
"platform/commonUI/dialog",
|
"platform/commonUI/dialog",
|
||||||
"platform/commonUI/general",
|
"platform/commonUI/general",
|
||||||
"platform/commonUI/inspect",
|
"platform/commonUI/inspect",
|
||||||
"platform/commonUI/mobile",
|
"platform/commonUI/mobile",
|
||||||
"platform/commonUI/themes/espresso",
|
"platform/commonUI/themes/espresso",
|
||||||
|
"platform/commonUI/notification",
|
||||||
"platform/containment",
|
"platform/containment",
|
||||||
"platform/execution",
|
"platform/execution",
|
||||||
"platform/telemetry",
|
"platform/telemetry",
|
||||||
|
@ -16,9 +16,9 @@
|
|||||||
</span>
|
</span>
|
||||||
<a ng-hide="active.notification.primaryAction === undefined"
|
<a ng-hide="active.notification.primaryAction === undefined"
|
||||||
class="banner-elem l-action s-action"
|
class="banner-elem l-action s-action"
|
||||||
ng-click="active.notification.primaryAction.action()">
|
ng-click="action(active.notification.primaryAction.action, $event)">
|
||||||
{{active.notification.primaryAction.label}}
|
{{active.notification.primaryAction.label}}
|
||||||
</a>
|
</a>
|
||||||
<a class="banner-elem ui-symbol close" ng-click="dismiss(active.notification)">
|
<a class="banner-elem ui-symbol close" ng-click="dismiss(active.notification, $event)">
|
||||||
x</a>
|
x</a>
|
||||||
</div>
|
</div>
|
@ -28,7 +28,12 @@ define(
|
|||||||
function BannerController($scope, notificationService, dialogService) {
|
function BannerController($scope, notificationService, dialogService) {
|
||||||
$scope.active = notificationService.active;
|
$scope.active = notificationService.active;
|
||||||
$scope.MessageSeverity = MessageSeverity;
|
$scope.MessageSeverity = MessageSeverity;
|
||||||
$scope.dismiss = function(notification) {
|
$scope.action = function (action, $event){
|
||||||
|
$event.stopPropagation();
|
||||||
|
return action();
|
||||||
|
}
|
||||||
|
$scope.dismiss = function(notification, $event) {
|
||||||
|
$event.stopPropagation();
|
||||||
notificationService.dismissOrMinimize(notification);
|
notificationService.dismissOrMinimize(notification);
|
||||||
};
|
};
|
||||||
$scope.maximize = function(notification) {
|
$scope.maximize = function(notification) {
|
||||||
|
@ -34,7 +34,8 @@
|
|||||||
],
|
],
|
||||||
"indicators": [
|
"indicators": [
|
||||||
{
|
{
|
||||||
"implementation": "NotificationIndicator.js"
|
"implementation": "NotificationIndicator.js",
|
||||||
|
"priority": "fallback"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -180,7 +180,7 @@ define(
|
|||||||
notifications queued for display, setup a timeout to
|
notifications queued for display, setup a timeout to
|
||||||
dismiss the dialog.
|
dismiss the dialog.
|
||||||
*/
|
*/
|
||||||
if (notification && (notification.autoDismiss !== false
|
if (notification && (notification.autoDismiss
|
||||||
|| this.selectNextNotification())) {
|
|| this.selectNextNotification())) {
|
||||||
|
|
||||||
timeout = notification.autoDismiss || this.DEFAULT_AUTO_DISMISS;
|
timeout = notification.autoDismiss || this.DEFAULT_AUTO_DISMISS;
|
||||||
|
@ -34,10 +34,12 @@
|
|||||||
],
|
],
|
||||||
"indicators": [
|
"indicators": [
|
||||||
{
|
{
|
||||||
"implementation": "DialogLaunchIndicator.js"
|
"implementation": "DialogLaunchIndicator.js",
|
||||||
|
"priority": "fallback"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"implementation": "NotificationLaunchIndicator.js"
|
"implementation": "NotificationLaunchIndicator.js",
|
||||||
|
"priority": "fallback"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user