Bugzilla – Attachment 146857 Details for
Bug 32999
Click handler to show QR code in OPAC lacks preventDefault
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32999: Click handler to show QR code in OPAC lacks preventDefault
Bug-32999-Click-handler-to-show-QR-code-in-OPAC-la.patch (text/plain), 1.65 KB, created by
Owen Leonard
on 2023-02-17 16:22:43 UTC
(
hide
)
Description:
Bug 32999: Click handler to show QR code in OPAC lacks preventDefault
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2023-02-17 16:22:43 UTC
Size:
1.65 KB
patch
obsolete
>From ea4b970b2a4e7b5dcc82d3bf8f5b1b6af012f5d4 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 17 Feb 2023 16:07:36 +0000 >Subject: [PATCH] Bug 32999: Click handler to show QR code in OPAC lacks > preventDefault > >This patch adds "preventDefault()" to the click handler for showing >the bibliographic detail QR code. This prevents the page from scrolling >to the top when the user clicks the link. > >To test, apply the patch and make sure the OPACDetailQRCode system >preference is enabled. > >Locate a bibliographic record and view the detail page. If necessary, >reduce the size of your browser window so that you have to scroll down >a bit to bring the "Send to device" menu item into view in the sidebar. >Click the link to confirm that it shows the QR code and that the page >doesn't jump to the top. >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index c6fb1c26c65..61eae02a360 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -1680,7 +1680,8 @@ > document.getElementById("qrcode").appendChild( qrcode ); > } > >- $(".show_qrcode").on("click", function(){ >+ $(".show_qrcode").on("click", function(e){ >+ e.preventDefault(); > var qrcodeImg = $("#qrcode"); > if( qrcodeImg.hasClass("d-none") ){ > qrcodeImg.removeClass("d-none"); >-- >2.30.2
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 32999
:
146857
|
146869
|
146900