* VRFS-2890 fix infinite scroll as well as bug with limit vs per_page style scrolling

This commit is contained in:
Seth Call 2015-03-24 14:59:20 -05:00
parent bfe302b2f1
commit 18563ff065
2 changed files with 10 additions and 2 deletions

View File

@ -69,8 +69,16 @@ module JamRuby
page = options[:page].to_i
per_page = options[:per_page].to_i
if per_page == 0
# try and see if limit was specified
limit = options[:limit]
limit ||= 20
limit = limit.to_i
else
limit = per_page
end
start = (page -1 )* per_page
limit = per_page
else
limit = options[:limit]
limit ||= 20

View File

@ -63,7 +63,7 @@
}
function defaultQuery() {
var query = { limit:LIMIT, page:currentPage};
var query = { per_page:LIMIT, page:currentPage + 1};
if(next) {
query.since = next;