Save and Finish blocking modal dialog Refactor and Styles #2500 (#2501)

* Save and Finish blocking modal dialog Refactor and Styles #2500

* created new template for ProgressDialogComponent

* Tweaks for #2501

- Normalized dialog icon size;
- Enhanced text formatting in dialog;
- Changed "Saving..." to remove ellipsis;
This commit is contained in:
Nikhil
2019-11-20 11:46:03 -08:00
committed by Deep Tailor
parent 6e2497461a
commit c6f83dea8d
6 changed files with 57 additions and 21 deletions

View File

@@ -129,17 +129,20 @@ const PLACEHOLDER_OBJECT = {};
saveAndFinishEditing() {
let dialog = this.openmct.overlays.progressDialog({
progressPerc: 'unknown',
progressText: 'Saving...',
message: 'Do not navigate away from this page or close this browser tab while this message is displayed.',
iconClass: 'info',
title: 'Saving',
});
return this.openmct.editor.save().then(()=> {
dialog.dismiss();
this.openmct.notifications.info('Save successful');
}).catch((error) => {
dialog.dismiss();
this.openmct.notifications.error('Error saving objects');
console.error(error);
});
return this.openmct.editor.save()
.then(()=> {
dialog.dismiss();
this.openmct.notifications.info('Save successful');
}).catch((error) => {
dialog.dismiss();
this.openmct.notifications.error('Error saving objects');
console.error(error);
});
},
saveAndContinueEditing() {
this.saveAndFinishEditing().then(() => {