Bugzilla – Attachment 93176 Details for
Bug 23680
Can't open 'Edit items' or 'Add item' links in new tab - tab is closed immediately
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23680: Incorrect conversion of Perl boolean to js
Bug-23680-Incorrect-conversion-of-Perl-boolean-to-.patch (text/plain), 1.70 KB, created by
David Nind
on 2019-09-26 19:31:23 UTC
(
hide
)
Description:
Bug 23680: Incorrect conversion of Perl boolean to js
Filename:
MIME Type:
Creator:
David Nind
Created:
2019-09-26 19:31:23 UTC
Size:
1.70 KB
patch
obsolete
>From cb753a61fff3802d8c2addf5974f8e2df671c91b Mon Sep 17 00:00:00 2001 >From: David Gustafsson <david.gustafsson@ub.gu.se> >Date: Thu, 26 Sep 2019 11:50:14 +0200 >Subject: [PATCH] Bug 23680: Incorrect conversion of Perl boolean to js > >A Perl boolean value is on the server side converted >to a JS string (resulting in the values '0' or '1). >Since the string '0' is a truthy value in JS this >incorrectly triggers window.close() on the client >in many instances, for example when adding a new item. > >To test: > >1. Go to a bibliographic record in the staff client. >2. Expand the "New" menu and open "New item" in new tab. >3. The new tab will immediately close. >4. Apply the patch. >5. Perform steps 1-2 again. >6. The tab should now remain open. > >Sponsored-by: Gothenburg University Library > >Signed-off-by: David Nind <david@davidnind.com> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc >index 97cadb9148..57e389e8a7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/str/cataloging_additem.inc >@@ -3,7 +3,11 @@ > var searchid = '[% searchid | html %]'; > var biblionumber = '[% biblionumber | html %]'; > var frameworkcode = '[% frameworkcode | html %]'; >- var popup = '[% popup | html %]'; >+ [% IF popup %] >+ var popup = true; >+ [% ELSE %] >+ var popup = false; >+ [% END %] > var op = '[% op | html %]'; > var LABEL_EDIT_ITEM = _("Edit item"); > var LABEL_DELETE_ITEM = _("Delete item"); >-- >2.11.0
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 23680
:
93166
|
93176
|
93563