* VRFS-2890 fix infinite scroll as well as bug with limit vs per_page style scrolling
This commit is contained in:
parent
bfe302b2f1
commit
18563ff065
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue