|
|
@@ -8,7 +8,8 @@ var conf = { |
|
|
|
}, |
|
|
|
home: { |
|
|
|
width: 4, |
|
|
|
curpage: 0 |
|
|
|
curpage: 0, |
|
|
|
end: 0 |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
@@ -89,6 +90,10 @@ function document_load() { |
|
|
|
conf.home.curpage, |
|
|
|
null, |
|
|
|
function(data, textStatus, jqXHR) { |
|
|
|
// last document was loaded, stop scrolling |
|
|
|
if (data.length < conf.home.width) { |
|
|
|
conf.home.end = 1; |
|
|
|
} |
|
|
|
$.each(data, function(id, doc) { |
|
|
|
var col = $(tmpl) |
|
|
|
.find(".autodoc_template_home_col") |
|
|
@@ -131,8 +136,12 @@ function document_load() { |
|
|
|
} |
|
|
|
|
|
|
|
function page_home_scroll() { |
|
|
|
// don't scroll if we've loaded the last document |
|
|
|
if (conf.home.end) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (isvisible($(".autodoc_template_home_col").last())) { |
|
|
|
console.log("scroll to page " + conf.home.curpage); |
|
|
|
console.log("scroll to page " + conf.home.curpage); |
|
|
|
conf.home.curpage++; |
|
|
|
document_load(); |
|
|
|
} |