Bugzilla – Attachment 114853 Details for
Bug 27338
Use current window as fallback, if no opener window available during importing record from Z39.50
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 27338: Use current window as fallback, if no opener window available during importing record from Z39.50
Bug-27338-Use-current-window-as-fallback-if-no-ope.patch (text/plain), 2.14 KB, created by
Josef Moravec
on 2021-01-05 08:43:46 UTC
(
hide
)
Description:
Bug 27338: Use current window as fallback, if no opener window available during importing record from Z39.50
Filename:
MIME Type:
Creator:
Josef Moravec
Created:
2021-01-05 08:43:46 UTC
Size:
2.14 KB
patch
obsolete
>From 76dcf86547aec037eeb5fced987e39cd1f777bcd Mon Sep 17 00:00:00 2001 >From: Josef Moravec <josef.moravec@gmail.com> >Date: Tue, 5 Jan 2021 09:30:16 +0100 >Subject: [PATCH] Bug 27338: Use current window as fallback, if no opener > window available during importing record from Z39.50 > >Test plan: >1) Apply the patch >2) Confirm there is no regression_ > 2a) Go to cataloguing (basic editor) > 2b) Click on "New from Z39.50/SRU" or some dropdown variant for particular framework > 2c) Perform a search and import a record > 2f) Record is imported into editor and search window is closed >3) Open new browser tab/window and go direct to Z39.50 search url: > /cgi-bin/koha/cataloguing/z3950_search.pl?biblionumber=&frameworkcode=BKS >4) Perform a search and import a record. It should be imported into the current tab/window >--- > koha-tmpl/intranet-tmpl/prog/js/z3950_search.js | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >index 39a7af0c0d..6a146a0e88 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/z3950_search.js >@@ -1,13 +1,15 @@ > /* global __ total_pages */ > //z3950_search.js for Authorities, Bib records and Acquisitions module > function Import(Breeding, recordid, AuthType, FrameworkCode) { >- >+ target = (window.opener != null) ? window.opener.document : document; > if ( AuthType == false ) { >- opener.document.location="../cataloguing/addbiblio.pl?biblionumber="+recordid+"&z3950=1&frameworkcode="+FrameworkCode+"&breedingid="+Breeding; >+ target.location="../cataloguing/addbiblio.pl?biblionumber="+recordid+"&z3950=1&frameworkcode="+FrameworkCode+"&breedingid="+Breeding; > } else { >- opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid; >+ target.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid; >+ } >+ if (window.opener != null) { >+ window.close(); > } >- window.close(); > return false; > > } >-- >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 27338
:
114853
|
114944