Bugzilla – Attachment 70326 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: Followup - only fire if changes and don't use javascript
Bug-19267-Followup---only-fire-if-changes-and-dont.patch (text/plain), 1.16 KB, created by
Nick Clemens
on 2018-01-08 16:54:46 UTC
(
hide
)
Description:
Bug 19267: Followup - only fire if changes and don't use javascript
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2018-01-08 16:54:46 UTC
Size:
1.16 KB
patch
obsolete
>From 1e24ba709ddef9555d03818ad4614c02269c3f69 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Mon, 8 Jan 2018 16:53:47 +0000 >Subject: [PATCH] Bug 19267: Followup - only fire if changes and don't use > javascript > >--- > koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >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 3f047af..62f19b0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc >@@ -1077,9 +1077,12 @@ require( [ 'koha-backend', 'search', 'macros', 'marc-editor', 'marc-record', 'pr > return false; > } ); > >- $(window).on( 'beforeunload', function() { >- return editor.modified; >- } ); >+ window.onbeforeunload = function() { >+ if(editor.modified ) >+ { return 1; } >+ else >+ { return undef; } >+ }; > > // Start editor > Preferences.Load( [% USER_INFO.borrowernumber || 0 %] ); >-- >2.1.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