Bugzilla – Attachment 66911 Details for
Bug 19267
Advanced Editor - Rancor - Add warning before leaving page if there are unsaved modifications
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19267: Rancor - Warn before leaving page if record modified
Bug-19267-Rancor---Warn-before-leaving-page-if-rec.patch (text/plain), 1.33 KB, created by
Nick Clemens
on 2017-09-07 09:44:52 UTC
(
hide
)
Description:
Bug 19267: Rancor - Warn before leaving page if record modified
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2017-09-07 09:44:52 UTC
Size:
1.33 KB
patch
obsolete
>From bf149dc004855ae8deeb8cd77ab26b5b177a0a4c Mon Sep 17 00:00:00 2001 >From: Jesse Weaver <jweaver@bywatersolutions.com> >Date: Mon, 18 Jul 2016 16:31:20 -0600 >Subject: [PATCH] Bug 19267: Rancor - Warn before leaving page if record > modified > >To test: >1 - Open the advanced editor >2 - Make some changes to a record >3 - Click on 'Patrons' or leave the page in some way >4 - Note there is no warning and changes are not saved >5 - Apply patch >6 - Open the advanced editor >7 - Make some changes >8 - Leave the page >9 - Note you get a warning of unsaved changes and can stay on the page >--- > koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc | 4 ++++ > 1 file changed, 4 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >index a6ac276..3f047af 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >@@ -1077,6 +1077,10 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr > return false; > } ); > >+ $(window).on( 'beforeunload', function() { >+ return editor.modified; >+ } ); >+ > // Start editor > Preferences.Load( [% USER_INFO.borrowernumber || 0 %] ); > displayPreferences(editor); >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19267
:
66911
|
67274
|
70326
|
72924
|
73505
|
73609