Bugzilla – Attachment 152686 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: Insert searchid in URL correctly, so it doesn't follow the hash
Bug-28196-Insert-searchid-in-URL-correctly-so-it-d.patch (text/plain), 1.72 KB, created by
Sam Lau
on 2023-06-26 14:03:36 UTC
(
hide
)
Description:
Bug 28196: Insert searchid in URL correctly, so it doesn't follow the hash
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2023-06-26 14:03:36 UTC
Size:
1.72 KB
patch
obsolete
>From cb5101c94e9f2ec04a93c633ca3c78fd195d1d0d Mon Sep 17 00:00:00 2001 >From: Phil Ringnalda <phil@chetcolibrary.org> >Date: Mon, 19 Jun 2023 18:32:46 -0700 >Subject: [PATCH] Bug 28196: Insert searchid in URL correctly, so it doesn't > follow the hash > >Test plan: >1. Search the catalog in the staff client for anything which will return > at least two results >2. Click on any result to go to the bib detail page >3. Click the edit button for any item attached to the bib >4. Verify that the loaded URL contains &searchid=scs_(a number), and > that the URL ends with #edititem >5. Make any change to the item, save, verify that your change was made > >Signed-off-by: Sam Lau <samalau@gmail.com> >--- > koha-tmpl/intranet-tmpl/prog/js/browser.js | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/browser.js b/koha-tmpl/intranet-tmpl/prog/js/browser.js >index d5aae8b4e5..d51f78723a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/browser.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/browser.js >@@ -105,7 +105,9 @@ 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); >+ url.searchParams.set('searchid', me.searchid); >+ window.location = url.href; > }); > $('form[name="f"]').append('<input type="hidden" name="searchid" value="' + me.searchid + '"></input>'); > } >-- >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 28196
:
120027
|
122352
|
122384
|
122747
|
152478
|
152686
|
153295