LP1852782 MARC editor prevent navigation with changes
authorBill Erickson <berickxx@gmail.com>
Tue, 10 Dec 2019 22:35:49 +0000 (17:35 -0500)
committerBill Erickson <berickxx@gmail.com>
Fri, 21 Feb 2020 15:43:12 +0000 (10:43 -0500)
commit9e1598277d2ed566156ddf4b3d52025619725843
treeb04a18ac3a03d64df3c85b4678373d3448c1a0ea
parent1f3f200510fff745aac66f737c882bbbb537df82
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