Bug 12261: Staff client next/previous links lead to unknown record
commitfa5bc09926c54ca7e2609236b1f9d074bd9b0fc0
authorJuhani Seppälä <jseppal@student.uef.fi>
Tue, 17 Jun 2014 10:05:10 +0000 (17 13:05 +0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Sat, 21 Jun 2014 21:53:19 +0000 (21 18:53 -0300)
tree0cb909a32063d05a96b959036a61fea466833ade
parentd6bbe77deb563d5b3403a9696ec357a5d798a482
Bug 12261: Staff client next/previous links lead to unknown record

When using Staff client next/previous links after a search :
If the current record is the last of the results, clicking on "next"
will lead to the page of an unknown record with message :

The record you requested does not exist (NaN).

To test:
1) Do an intranet catalog search that has more than 1 results.
2) Click on the last search result and then click the "Next"-button from
   the top-left navigation.
3) Confirm that you get thrown to a page with the message: "The record
   you requested does not exist (NaN).".
4) Apply patch.
5) Repeat steps 1 - 2.
6) Confirm that the navigation button for "Next" is greyed out.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
This patch fixes the problem with last result in both single pages of
search results and multiple pages of search results.

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