From ac44b732e871808dab5e581f6ac6c4371dcef8b0 Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 29 Aug 2016 06:07:53 +0000 Subject: [PATCH] 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 Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../bootstrap/en/includes/opac-bottom.inc | 16 ++++++++++++++++ .../en/includes/opac-detail-sidebar.inc | 10 ++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index 3348c21bf1..fec61149cd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -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; + }); //]]> diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc index d02b4c2bed..3c14bea690 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-detail-sidebar.inc @@ -8,19 +8,17 @@ [% END %] [% END %] [% END %] -
  • Print
  • +
  • Print
  • [% IF Koha.Preference( 'virtualshelves' ) == 1 %] [% IF ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && loggedinusername ) %] -
  • - Save to your lists -
  • +
  • Save to your lists
  • [% END %] [% END %] [% IF Koha.Preference( 'opacbookbag' ) == 1 %] [% IF ( incart ) %] -
  • In your cart (remove)
  • +
  • In your cart (remove)
  • [% ELSE %] -
  • Add to your cart
  • +
  • Add to your cart
  • [% END %] [% END %] [% IF ( OpacHighlightedWords && query_desc ) %]