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> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
cacb576890
commit
880afc9035
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue