Bugzilla – Attachment 152478 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.67 KB, created by
Phil Ringnalda
on 2023-06-20 02:01:48 UTC
(
hide
)
Description:
Bug 28196: Insert searchid in URL correctly, so it doesn't follow the hash
Filename:
MIME Type:
Creator:
Phil Ringnalda
Created:
2023-06-20 02:01:48 UTC
Size:
1.67 KB
patch
obsolete
>From 7c4261a25624b10d94d09acf8ab85d40470b54e4 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 >--- > 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.40.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