From: Bill Erickson Date: Wed, 11 Dec 2019 22:03:19 +0000 (-0500) Subject: LP1852782 Progress indicator while saving MARC records X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=95331c22c6c0a7557404dd0185ead17e120759ba;p=evergreen%2Fpines.git LP1852782 Progress indicator while saving MARC records Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.html b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.html index dea85817e1..7daa2c89b2 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.html +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.html @@ -45,7 +45,16 @@ [disabled]="record && record.deleted" i18n>Save Changes -
+ + +
+
+ +
+
+
+ +
diff --git a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts index 1ecfb9e6e6..02c9b459cd 100644 --- a/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts @@ -35,6 +35,9 @@ export class MarcEditorComponent implements OnInit { sources: ComboboxEntry[]; context: MarcEditContext; + // True if the save request is in flight + dataSaving: boolean; + @Input() recordType: 'biblio' | 'authority' = 'biblio'; @Input() set recordId(id: number) { @@ -87,6 +90,8 @@ export class MarcEditorComponent implements OnInit { this.sources = []; this.recordSaved = new EventEmitter(); this.context = new MarcEditContext(); + + this.recordSaved.subscribe(_ => this.dataSaving = false); } ngOnInit() { @@ -135,6 +140,7 @@ export class MarcEditorComponent implements OnInit { saveRecord(): Promise { const xml = this.record.toXml(); + this.dataSaving = true; // Save actions clears any pending changes. this.context.changesPending = false; @@ -166,6 +172,7 @@ export class MarcEditorComponent implements OnInit { if (evt) { console.error(evt); this.failMsg.current().then(msg => this.toast.warning(msg)); + this.dataSaving = false; return; }