Bugzilla – Attachment 155256 Details for
Bug 34725
Remove use of onclick for OPAC cart
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34725: Remove use of onclick for OPAC cart
Bug-34725-Remove-use-of-onclick-for-OPAC-cart.patch (text/plain), 3.16 KB, created by
David Cook
on 2023-09-06 06:58:15 UTC
(
hide
)
Description:
Bug 34725: Remove use of onclick for OPAC cart
Filename:
MIME Type:
Creator:
David Cook
Created:
2023-09-06 06:58:15 UTC
Size:
3.16 KB
patch
obsolete
>From 1909294b2acfd67825a7140e15e5ba78cc9b03bb Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Wed, 6 Sep 2023 06:57:15 +0000 >Subject: [PATCH] Bug 34725: Remove use of onclick for OPAC cart > >This patch moves the click handler in the OPAC cart from the inline HTML >and out to an existing <script> element. > >Test plan: >0. Apply the patch >1. Go to http://localhost:8080/cgi-bin/koha/opac-search.pl?idx=&q=test&weight_search=1 >2. Add the results to the cart >3. Click on the "Cart" >4. One by one click on the title of each row >5. Notice how the parent window changes to the detail record for that title >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >index 30969b9013..4bfe59cca4 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt >@@ -303,7 +303,7 @@ > <input type="checkbox" class="cb" value="[% BIBLIO_RESULT.biblionumber | html %]" name="bib[% BIBLIO_RESULT.biblionumber | html %]" id="bib[% BIBLIO_RESULT.biblionumber | html %]"> > </td> > <td> >- <a href="#" onclick="openBiblio('[% PROCESS biblio_a_href biblionumber => BIBLIO_RESULT.biblionumber %]',[% BIBLIO_RESULT.biblionumber | html %])">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]</a> >+ <a href="#" class="bib_opener" data-link="[% PROCESS biblio_a_href biblionumber => BIBLIO_RESULT.biblionumber %]" data-biblionumber="[% BIBLIO_RESULT.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=BIBLIO_RESULT %]</a> > <!-- COinS / Openurl --> > <span class="Z3988" title="ctx_ver=Z39.88-2004&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.au=[% BIBLIO_RESULT.author | html %]&rft.btitle=[% BIBLIO_RESULT.title |url %]&rft.date=[% BIBLIO_RESULT.publicationyear | html %]&rft.tpages=[% BIBLIO_RESULT.item('size') | html %]&rft.isbn=[% BIBLIO_RESULT.isbn |url %]&rft.aucorp=&rft.place=[% BIBLIO_RESULT.place | html %]&rft.pub=[% BIBLIO_RESULT.publisher |url %]&rft.edition=[% BIBLIO_RESULT.edition | html %]&rft.series=[% BIBLIO_RESULT.series | html %]&rft.genre="></span> > [% IF ( TagsInputEnabled && loggedinusername ) %] >@@ -411,6 +411,12 @@ > [% END # / TagsInputEnabled && loggedinusername %] > > $(document).ready(function(){ >+ $("a.bib_opener").on('click',function(){ >+ let link = this.dataset.link; >+ let biblionumber = this.dataset.biblionumber; >+ openBiblio(link,biblionumber) >+ }); >+ > $(".brief").click(function(e){ > e.preventDefault(); > showLess(); >-- >2.30.2
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 34725
:
155256
|
155297
|
155757