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 Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
f636a041a6
commit
9e39d2d671
1 changed files with 7 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue