Bugzilla – Attachment 54975 Details for
Bug 17210
Remove use of onclick from biblio detail sidebar in OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 17210: Remove use of onclick from biblio detail sidebar in OPAC
SIGNED-OFF-Bug-17210-Remove-use-of-onclick-from-bi.patch (text/plain), 3.91 KB, created by
Owen Leonard
on 2016-08-29 13:00:19 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 17210: Remove use of onclick from biblio detail sidebar in OPAC
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2016-08-29 13:00:19 UTC
Size:
3.91 KB
patch
obsolete
>From eaa7a5aae156c51a4954b87a9cab272c748ef34d Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >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 <oleonard@myacpl.org> >--- > .../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; >+ }); > //]]> > </script> > >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 %] >- <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 ) %] >-- >2.1.4
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 17210
:
54967
|
54968
|
54975
|
55280
|
55281