[Dialog Service] Dismiss individual dialogs. Fixes #254

This commit is contained in:
Henry
2016-06-29 20:09:58 -07:00
parent 652a50c700
commit ea1780364b
11 changed files with 209 additions and 143 deletions

View File

@ -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;