Bugzilla – Attachment 111684 Details for
Bug 26445
Search results browser in staff has broken link back to results
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26445: Fix "back to result" link of the search result browser
Bug-26445-Fix-back-to-result-link-of-the-search-re.patch (text/plain), 2.02 KB, created by
Jonathan Druart
on 2020-10-15 08:52:55 UTC
(
hide
)
Description:
Bug 26445: Fix "back to result" link of the search result browser
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-10-15 08:52:55 UTC
Size:
2.02 KB
patch
obsolete
>From 1e865464f4307b7c25d82cf8823d838db7910437 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 15 Oct 2020 10:47:55 +0200 >Subject: [PATCH] Bug 26445: Fix "back to result" link of the search result > browser > >Not sure what was the expected behaviour, I am suggesting the following >one: >If you are browsing and you click "back to result", you will be >redirected to the page where the record appear on the search result >list. > >Say you search for "something" that returns 10 page (20 results per >page) >Click on first result first page >Click back to result >=> You see the first page with the first result at the top > >Click on second page, 3rd result >Click back to result >=> You see the second page with the biblio you clicked at the 3rd >position > >Click on second page, 3rd result >Click next/previous >Click back to result >=> You see the page where you last result were. > >I think the existing expected behaviour was to have the result you >clicked at the first position of the result page, but I am not sure it >really makes sense. > >Hope this makes sense however! >--- > koha-tmpl/intranet-tmpl/js/browser.js | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/js/browser.js b/koha-tmpl/intranet-tmpl/js/browser.js >index ea19060a64..9ab1ab586a 100644 >--- a/koha-tmpl/intranet-tmpl/js/browser.js >+++ b/koha-tmpl/intranet-tmpl/js/browser.js >@@ -73,7 +73,11 @@ KOHA.browser = function (searchid, biblionumber) { > me.show = function () { > if (current_search) { > me.curPos = $.inArray(biblionumber, current_search.results); >- me.offset = Math.floor((current_search.offset + me.curPos - 1) / current_search.pagelen) * current_search.pagelen; >+ if ( current_search.offset + me.curPos <= current_search.pagelen ) { // First page >+ me.offset = 0; >+ } else { >+ me.offset = current_search.offset - 1; >+ } > > $(document).ready(function () { > if (me.curPos > -1) { >-- >2.20.1
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 26445
:
111684
|
111861
|
111877