mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 07:38:15 +00:00
[Save] Show blocking dialog
Show a blocking dialog while the save action is being performed. Prevents users from pressing save a second time or performing further actions while a save is in progress. Fixes https://github.jpl.nasa.gov/MissionControl/vista/issues/362
This commit is contained in:
20
platform/commonUI/edit/src/actions/SaveInProgressDialog.js
Normal file
20
platform/commonUI/edit/src/actions/SaveInProgressDialog.js
Normal file
@ -0,0 +1,20 @@
|
||||
define([], function () {
|
||||
function SaveInProgressDialog(dialogService) {
|
||||
this.dialogService = dialogService;
|
||||
}
|
||||
|
||||
SaveInProgressDialog.prototype.show = function () {
|
||||
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,
|
||||
severity: "info"
|
||||
});
|
||||
};
|
||||
|
||||
SaveInProgressDialog.prototype.hide = function () {
|
||||
this.dialogService.dismiss();
|
||||
};
|
||||
|
||||
return SaveInProgressDialog;
|
||||
});
|
Reference in New Issue
Block a user