From eaa7a5aae156c51a4954b87a9cab272c748ef34d Mon Sep 17 00:00:00 2001 From: Aleisha Amohia Date: Mon, 29 Aug 2016 06:07:53 +0000 Subject: [PATCH] [SIGNED-OFF] Bug 17210: Remove use of onclick from biblio detail sidebar in OPAC Content-Type: text/plain; charset="utf-8" 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 --- .../opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 16 ++++++++++++++++ .../bootstrap/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 3348c21..fec6114 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 d02b4c2..3c14bea 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 ) %] -- 2.1.4