Bugzilla – Attachment 174063 Details for
Bug 35126
Remove the use of event attributes from when adding records to lists in the OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35126: Remove onload from opac-addbybiblionumber.pl
Bug-35126-Remove-onload-from-opac-addbybiblionumbe.patch (text/plain), 3.42 KB, created by
Aleisha Amohia
on 2024-11-06 03:42:33 UTC
(
hide
)
Description:
Bug 35126: Remove onload from opac-addbybiblionumber.pl
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2024-11-06 03:42:33 UTC
Size:
3.42 KB
patch
obsolete
>From 24f80fd05418bde8fcc941b626e226036eb38770 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <lari.taskula@hypernova.fi> >Date: Wed, 2 Oct 2024 18:44:27 +0000 >Subject: [PATCH] Bug 35126: Remove onload from opac-addbybiblionumber.pl > >To test: > >Case a) Adding to a new list > >1. Enable virtualshelves system preference >2. Search for any record and click it >3. On the right hand side of record view, click "Save to your lists" >4. A new pop up opens. >5. Under "Add to a new list", give any name to the list >6. Under "Add to a new list", click "Save" >7. Observe popup closing >8. Observe record view page reloading > >Case b) Adding to an existing list > >1. Enable virtualshelves system preference >2. Search for any record and click it >3. On the right hand side of record view, click "Save to your lists" >4. A new pop up opens. >5. Under "Add to a list", select an existing list >(it can be the same as the one you created in case a, it does not matter here) >6. Under "Add to a list", click "Save" >7. Observe popup closing >8. Unlike case a, observe record view page NOT reloading > >Signed-off-by: David Cook <dcook@prosentient.com.au> >Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> >--- > .../en/modules/opac-addbybiblionumber.tt | 13 ++++++++++++- > opac/opac-addbybiblionumber.pl | 17 +++++++---------- > 2 files changed, 19 insertions(+), 11 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >index 501f048444b..70f1573d125 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt >@@ -123,4 +123,15 @@ > </div> <!-- / .main --> > > [% INCLUDE 'opac-bottom.inc' is_popup=1 %] >-[% BLOCK jsinclude %][% END %] >+[% BLOCK jsinclude %] >+<script> >+ $(document).ready(function() { >+ [% IF WINDOW_PARENT_RELOAD %] >+ opener.location.reload(); >+ [% END %] >+ [% IF WINDOW_CLOSE %] >+ window.close(); >+ [% END %] >+ }); >+</script> >+[% END %] >diff --git a/opac/opac-addbybiblionumber.pl b/opac/opac-addbybiblionumber.pl >index 1916c26e9ed..3ea34220fdc 100755 >--- a/opac/opac-addbybiblionumber.pl >+++ b/opac/opac-addbybiblionumber.pl >@@ -70,12 +70,11 @@ if( $op && $op !~ /^cud-/ ) { > for my $biblionumber (@biblionumbers) { > $shelf->add_biblio( $biblionumber, $loggedinuser ); > } >- >- #Reload the page where you came from >- print $query->header; >- print "<html><meta http-equiv=\"refresh\" content=\"0\" /><body onload=\"window.opener.location.reload(true);self.close();\"></body></html>"; >- exit; > } >+ $template->param( >+ WINDOW_CLOSE => 1, >+ WINDOW_PARENT_RELOAD => 1, >+ ); > } > } elsif ($shelfnumber) { > my $shelfnumber = $query->param('shelfnumber'); >@@ -84,11 +83,9 @@ if( $op && $op !~ /^cud-/ ) { > for my $biblionumber (@biblionumbers) { > $shelf->add_biblio( $biblionumber, $loggedinuser ); > } >- >- #Close this page and return >- print $query->header; >- print "<html><meta http-equiv=\"refresh\" content=\"0\" /><body onload=\"self.close();\"></body></html>"; >- exit; >+ $template->param( >+ WINDOW_CLOSE => 1, >+ ); > } else { > $authorized = 0; > } >-- >2.39.5
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 35126
:
172332
|
173247
| 174063