LP1852782 MARC editor prevent navigation with changes
authorBill Erickson <berickxx@gmail.com>
Tue, 10 Dec 2019 22:35:49 +0000 (17:35 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 19 Aug 2020 15:09:11 +0000 (11:09 -0400)
commit315f547118c83c356d1ff32fdad4a4d2c00994e1
treeb1c93aa6bf9257677d061e42c98d7341b3079e13
parent104235d19c872a35953aab3fa664c65669576e19
LP1852782 MARC editor prevent navigation with changes

Show a confirmation dialog when the user attempts to navigate away from
the MARC edit tab in the catalog if the MARC editor has pending changes.

The dialog will be shown if the user attempts to change tabs or navigate
away from the record detail page w/in Angular.

If the user unloads / reloads the page, the stock browser onbeforeunload
confirmation dialog will be displayed instead.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/eg2/src/app/share/util/can-deactivate.guard.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/routing.module.ts
Open-ILS/src/eg2/src/app/staff/share/marc-edit/editable-content.component.ts
Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor-context.ts
Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.ts
Open-ILS/src/eg2/src/app/staff/share/marc-edit/flat-editor.component.html
Open-ILS/src/eg2/src/app/staff/share/marc-edit/flat-editor.component.ts