Bugzilla – Attachment 122352 Details for
Bug 28196
In page anchors on additem.pl don't always go to the right place
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28196: make sure URL hash is appended last
Bug-28196-make-sure-URL-hash-is-appended-last.patch (text/plain), 1.87 KB, created by
Lucas Gass (lukeg)
on 2021-06-23 22:06:38 UTC
(
hide
)
Description:
Bug 28196: make sure URL hash is appended last
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2021-06-23 22:06:38 UTC
Size:
1.87 KB
patch
obsolete
>From 4161e315b01364bd1e7f67a0dbdc9f152a1ca2e8 Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Wed, 23 Jun 2021 22:03:09 +0000 >Subject: [PATCH] Bug 28196: make sure URL hash is appended last > >TO test: >1 Do a search within the staff client >2 Click on any results and go to the detail page >3 Click the edit button on any item in that record, it should take you to a URL like this: '/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=55&itemnumber=117#edititem&searchid=scs_1619109565224' >4 Apply patch >5 Do steps 1 & 2 again >Click the edit button on any item in that record, it should take you to a URL like this: '/cgi-bin/koha/cataloguing/additem.pl?op=edititem&biblionumber=55&itemnum ber=117&searchid=scs_1619109565224#edititem' >6. If they URL hash is last the anchor should work and you'll be placed on the h2 element with and ID of edititem >--- > koha-tmpl/intranet-tmpl/js/browser.js | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/js/browser.js b/koha-tmpl/intranet-tmpl/js/browser.js >index 19d707376e..c5666ac170 100644 >--- a/koha-tmpl/intranet-tmpl/js/browser.js >+++ b/koha-tmpl/intranet-tmpl/js/browser.js >@@ -105,7 +105,8 @@ KOHA.browser = function (searchid, biblionumber) { > }); > $('a[href*="biblionumber="]').not('a[target="_blank"]').click(function (ev) { > ev.preventDefault(); >- window.location = $(this).attr('href') + '&searchid=' + me.searchid; >+ var url = new URL($(this).attr('href'), window.location.origin); >+ window.location = url.pathname + url.search + 'searchid=' + me.searchid + url.hash; > }); > $('form[name="f"]').append('<input type="hidden" name="searchid" value="' + me.searchid + '"></input>'); > } >-- >2.11.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 28196
:
120027
|
122352
|
122384
|
122747
|
152478
|
152686
|
153295