Bug 12481: Staff client detail-view "next" link is greyed out when the last search...
authorJuhani Seppälä <jseppal@student.uef.fi>
Thu, 26 Jun 2014 08:28:19 +0000 (11:28 +0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Thu, 3 Jul 2014 12:52:33 +0000 (09:52 -0300)
commit3e0e65ca1090e51d1277104a66afd0aae2d62c60
treef1b27b0844a965cce548835f0ead6ad9f57491b3
parenta06cb31941f8cb4cee5498f25e518344e8f9aeda
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

When doing a staff client catalog search with more than 1 page of results
and clicking the last result on any search result page, the top-left navigation
button for "next" is greyed out.

Tested on newest Firefox & Chromium. Attempts to restore originally planned checks for navigation
with the exception of not using results.length due to buggy behaviour where the results get concatenated
upon page reload & "return to results" navigation - a separate issue?

To test:
1) Do an intranet catalog search that has more than 1 page of results.
2) Click on the last result on a page that is not the last one & confirm that the navigation button "next" is greyed out.
4) Apply patch.
5) Do an intranet search with more than 1 but less results than fit on a single page.
6) Click on the last result on the page and confirm that the "Next" navigation button is greyed out.
6) Do an intranet search with more than 1 page of results.
7) Click on the last result of a page that's not the final page of the results & confirm that "Next" is not grey out.
8) Navigate to the last page of the results and click on the final result & confirm that "Next" is greyd out.

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

This patch prevents the "Next" button on detail view to be grayed out at the end of e result page.
Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/js/browser.js
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt