|
|
@ -106,6 +106,10 @@ define('navigator', ['forum/pagination', 'components'], function(pagination, com
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (topIndex && !bottomIndex) {
|
|
|
|
|
|
|
|
bottomIndex = topIndex;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (typeof navigator.callback === 'function' && topIndex && bottomIndex) {
|
|
|
|
if (typeof navigator.callback === 'function' && topIndex && bottomIndex) {
|
|
|
|
index = navigator.callback(topIndex, bottomIndex, count);
|
|
|
|
index = navigator.callback(topIndex, bottomIndex, count);
|
|
|
|
navigator.updateTextAndProgressBar();
|
|
|
|
navigator.updateTextAndProgressBar();
|
|
|
@ -174,12 +178,8 @@ define('navigator', ['forum/pagination', 'components'], function(pagination, com
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (config.usePagination) {
|
|
|
|
if (config.usePagination) {
|
|
|
|
if (window.location.search.indexOf('page') !== -1) {
|
|
|
|
|
|
|
|
navigator.update();
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var page = Math.ceil((postIndex + 1) / config.postsPerPage);
|
|
|
|
var page = Math.max(1, Math.ceil(postIndex / config.postsPerPage));
|
|
|
|
|
|
|
|
|
|
|
|
if(parseInt(page, 10) !== pagination.currentPage) {
|
|
|
|
if(parseInt(page, 10) !== pagination.currentPage) {
|
|
|
|
pagination.loadPage(page, function() {
|
|
|
|
pagination.loadPage(page, function() {
|
|
|
@ -198,7 +198,7 @@ define('navigator', ['forum/pagination', 'components'], function(pagination, com
|
|
|
|
function scrollToPid(postIndex, highlight, duration, offset) {
|
|
|
|
function scrollToPid(postIndex, highlight, duration, offset) {
|
|
|
|
var scrollTo = components.get('post/anchor', postIndex);
|
|
|
|
var scrollTo = components.get('post/anchor', postIndex);
|
|
|
|
|
|
|
|
|
|
|
|
if (!scrollTo) {
|
|
|
|
if (!scrollTo.length) {
|
|
|
|
navigator.scrollActive = false;
|
|
|
|
navigator.scrollActive = false;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|