Bugzilla – Attachment 77738 Details for
Bug 19390
OPAC view link in staff results should open in a new tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19390: Make jQuery selector more specific, so OPAC view link can open in new tab
Bug-19390-Make-jQuery-selector-more-specific-so-OP.patch (text/plain), 2.28 KB, created by
Martin Renvoize (ashimema)
on 2018-08-13 09:08:29 UTC
(
hide
)
Description:
Bug 19390: Make jQuery selector more specific, so OPAC view link can open in new tab
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-08-13 09:08:29 UTC
Size:
2.28 KB
patch
obsolete
>From d5d7cb072c5831104ee84c8d0a4cda73558cdf32 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer.83@web.de> >Date: Fri, 10 Aug 2018 17:18:39 +0000 >Subject: [PATCH] Bug 19390: Make jQuery selector more specific, so OPAC view > link can open in new tab > >The OPAC view link in the staff result list already had a target="_blank", >but it didn't work, because of the JavaScript for the result list browser >in staff. > >The JavaSript code was looking for the links to the detail page in staff >and this also selected the link to the detail page in OPAC. By changing >detail.pl to \detail.pl opac-detail.pl will no longer be selected. > >To test: >- Search in the staff interface >- Click "OPAC view" links in staff result lists >- Click "OPAC view' links in detai page >- Verify both now open in a new tab >- Click other links and test that navigation (previous, next, > return to results) works as expected >- Inside the staff client, you should see something like > searchid=scs_1533922927978 added to the URLs > >Signed-off-by: Maryse Simard <maryse.simard@inlibro.com> >Followed the test plan and it works. >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/js/browser.js | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/js/browser.js b/koha-tmpl/intranet-tmpl/js/browser.js >index 7e40785d05..173eaa063c 100644 >--- a/koha-tmpl/intranet-tmpl/js/browser.js >+++ b/koha-tmpl/intranet-tmpl/js/browser.js >@@ -63,10 +63,10 @@ KOHA.browser = function (searchid, biblionumber) { > sessionStorage.setItem('searches', JSON.stringify(searches)); > $(document).ready(function () { > //FIXME It's not a good idea to modify the click events >- $('#searchresults table tr a[href*="detail.pl"]').on('click', function (ev) { >+ $('#searchresults table tr a[href*="/detail.pl"]').on('click', function (ev) { > ev.preventDefault(); > }); >- $('#searchresults table tr a[href*="detail.pl"]').on('mousedown', function (ev) { >+ $('#searchresults table tr a[href*="/detail.pl"]').on('mousedown', function (ev) { > if ( ev.which == 2 || ev.which == 1 && ev.ctrlKey ) { > // Middle click or ctrl + click > ev.preventDefault(); >-- >2.18.0
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 19390
:
77706
|
77713
| 77738