From 4a67e5da99037ee815e135163c9523de7e897eae Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 27 Dec 2019 11:04:32 -0500 Subject: [PATCH] LP#1827942: follow-up to fix a couple issues [1] Sets a default value for the modal options for dialogs such as ProgressDialog that do not supply any value for the options parameter; otherwise, progress dialogs would not appear at all. [2] Fix lint warnings. Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/share/dialog/dialog.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/dialog/dialog.component.ts b/Open-ILS/src/eg2/src/app/share/dialog/dialog.component.ts index 27b611fb2f..866adec0a8 100644 --- a/Open-ILS/src/eg2/src/app/share/dialog/dialog.component.ts +++ b/Open-ILS/src/eg2/src/app/share/dialog/dialog.component.ts @@ -76,14 +76,16 @@ export class DialogComponent implements OnInit { this.onOpen$ = new EventEmitter(); } - open(options?: NgbModalOptions): Observable { + open(options: NgbModalOptions = { backdrop: 'static' }): Observable { if (this.modalRef !== null) { this.error('Dialog was replaced!'); this.finalize(); } - options.backdrop="static"; + // force backdrop to static if caller passed in any options + options.backdrop = 'static'; + this.modalRef = this.modalService.open(this.dialogContent, options); DialogComponent.instances[this.identifier] = this; -- 2.11.0