From: Galen Charlton <gmc@equinoxinitiative.org> Date: Fri, 27 Dec 2019 16:04:32 +0000 (-0500) Subject: LP#1827942: follow-up to fix a couple issues X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4a67e5da99037ee815e135163c9523de7e897eae;p=evergreen%2Fequinox.git 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 <gmc@equinoxinitiative.org> --- 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<any>(); } - open(options?: NgbModalOptions): Observable<any> { + open(options: NgbModalOptions = { backdrop: 'static' }): Observable<any> { 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;