Allow for the page offset when listing the "Result x of y" values.
authorbott <bott@grpl.org>
Wed, 14 Dec 2011 17:31:30 +0000 (12:31 -0500)
committerDan Scott <dscott@laurentian.ca>
Thu, 15 Dec 2011 04:38:07 +0000 (23:38 -0500)
The record details page did not show the page offset correctly, so
result 13 would show up as "Result 3 of ###", and result 23 would also
show up as "Result 3 of ###".

Signed-off-by: bott <bott@grpl.org>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/web/opac/skin/default/js/rdetail.js

index dfc4c7d..ee77624 100644 (file)
@@ -85,6 +85,10 @@ function rdetailSetPaging(ids) {
                        break;
                }
        }
+       var cgi = new CGI();   // add the offset if we're not on the first page of results
+       var offset = parseInt(cgi.param('o'));
+       if (offset)
+               i = i + offset;
 
        $('np_offset').appendChild(text(i + 1));
        $('np_count').appendChild(text(getHitCount()));