[Koha-bugs] [Bug 12481] Staff client detail-view "next" link is greyed out when the last search result of any results page is clicked or navigated into

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 30 08:18:38 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12481

--- Comment #9 from Juhani Seppälä <jseppal at student.uef.fi> ---
(In reply to Marc Véron from comment #8)
> I suppose that the first patch is obsolete? Seems to be the same code.
> 
> I applied the second patch, did a search wit a couple of pages as result,
> went to the first detail from one of the result pages and clicked "Next"
> until the end of this page. Then it seems that I am "trapped" on this result
> page, after the last entry the first entry of the same result page is
> displayed (should be the first entry of the next page).

This is not the only interesting behaviour I've come across with the
navigation. There's another issue where the results of the page get
concatenated infinitely on page reload, which originally led me to believe the
results-array in the cookie was the whole results set. These should probably be
reported separately? The behaviour you're describing should be unrelated to my
patch and I've come across it before doing any changes. Can't be 100%,
obviously.

Related js (which I have not touched):

    var browseRecords = function (movement) {
        var newSearchPos = me.curPos + movement;
        if (newSearchPos > me.searchCookie.results.length - 1) {
            window.location = '/cgi-bin/koha/catalogue/search.pl?' +
decodeURIComponent(me.searchCookie.query) + '&limit=' +
decodeURIComponent(me.searchCookie.limit) + '&sort=' + me.searchCookie.sort +
'&gotoPage=detail.pl&gotoNumber=first&searchid=' + me.searchid + '&offset=' +
newSearchPos;
        } else if (newSearchPos < 0) {
            window.location = '/cgi-bin/koha/catalogue/search.pl?' +
decodeURIComponent(me.searchCookie.query) + '&limit=' +
decodeURIComponent(me.searchCookie.limit) + '&sort=' + me.searchCookie.sort +
'&gotoPage=detail.pl&gotoNumber=last&searchid=' + me.searchid + '&offset=' +
(me.offset - me.searchCookie.pagelen);
        } else {
            window.location = window.location.href.replace('biblionumber=' +
biblionumber, 'biblionumber=' + me.searchCookie.results[newSearchPos]);
        }
    }

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list