mirror of
https://github.com/nasa/openmct.git
synced 2025-06-17 14:48:13 +00:00
[Dialog Service] Dismiss individual dialogs. Fixes #254
This commit is contained in:
@ -1,10 +1,11 @@
|
||||
define([], function () {
|
||||
function SaveInProgressDialog(dialogService) {
|
||||
this.dialogService = dialogService;
|
||||
this.dialog = undefined;
|
||||
}
|
||||
|
||||
SaveInProgressDialog.prototype.show = function () {
|
||||
this.dialogService.showBlockingMessage({
|
||||
this.dialog = this.dialogService.showBlockingMessage({
|
||||
title: "Saving...",
|
||||
hint: "Do not navigate away from this page or close this browser tab while this message is displayed.",
|
||||
unknownProgress: true,
|
||||
@ -13,7 +14,9 @@ define([], function () {
|
||||
};
|
||||
|
||||
SaveInProgressDialog.prototype.hide = function () {
|
||||
this.dialogService.dismiss();
|
||||
if (this.dialog) {
|
||||
this.dialog.dismiss();
|
||||
}
|
||||
};
|
||||
|
||||
return SaveInProgressDialog;
|
||||
|
Reference in New Issue
Block a user