Bug 17210: Remove use of onclick from biblio detail sidebar in OPAC
Four instances of onclick here: 1) Print 2) Save to your lists 3) Add to your cart 4) Remove from cart To test: Find a biblio detail page in OPAC and confirm all four events above work as expected before and after the patch. Sponsored-by: Catalyst IT Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
6378027fd2
commit
ac44b732e8
2 changed files with 20 additions and 6 deletions
|
@ -149,6 +149,22 @@ $.widget.bridge('uitooltip', $.ui.tooltip);
|
|||
verify_images();
|
||||
});
|
||||
[% END %]
|
||||
|
||||
$(".print-large").on("click",function(){
|
||||
window.print();
|
||||
});
|
||||
$(".addtoshelf").on("click",function(){
|
||||
Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]');
|
||||
return false;
|
||||
});
|
||||
$(".addrecord").on("click",function(){
|
||||
addRecord('[% biblionumber %]');
|
||||
return false;
|
||||
});
|
||||
$(".cartRemove").on("click",function(){
|
||||
delSingleRecord('[% biblionumber %]');
|
||||
return false;
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
|
|
|
@ -8,19 +8,17 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
<li><a class="print-large" href="#" onclick="window.print();">Print</a></li>
|
||||
<li><a class="print-large" href="#">Print</a></li>
|
||||
[% IF Koha.Preference( 'virtualshelves' ) == 1 %]
|
||||
[% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername ) %]
|
||||
<li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]" onclick="Dopop('opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]'); return false;">
|
||||
Save to your lists
|
||||
</a></li>
|
||||
<li><a class="addtoshelf" href="/cgi-bin/koha/opac-addbybiblionumber.pl?biblionumber=[% biblionumber %]">Save to your lists</a></li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF Koha.Preference( 'opacbookbag' ) == 1 %]
|
||||
[% IF ( incart ) %]
|
||||
<li><a class="incart cart[% biblionumber %]" href="#" onclick="addRecord('[% biblionumber %]'); return false;">In your cart</a> <a class="cartRemove cartR[% biblionumber %]" href="#" onclick="delSingleRecord('[% biblionumber %]'); return false;">(remove)</a></li>
|
||||
<li><a class="incart cart[% biblionumber %] addrecord" href="#">In your cart</a> <a class="cartRemove cartR[% biblionumber %]" href="#">(remove)</a></li>
|
||||
[% ELSE %]
|
||||
<li><a class="addtocart cart[% biblionumber %]" href="#" onclick="addRecord('[% biblionumber %]'); return false;">Add to your cart</a> <a style="display:none;" class="cartRemove cartR[% biblionumber %]" href="#" onclick="delSingleRecord('[% biblionumber %]'); return false;">(remove)</a></li>
|
||||
<li><a class="addtocart cart[% biblionumber %] addrecord" href="#">Add to your cart</a> <a style="display:none;" class="cartRemove cartR[% biblionumber %]" href="#">(remove)</a></li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF ( OpacHighlightedWords && query_desc ) %]
|
||||
|
|
Loading…
Reference in a new issue