doing it properly this time

mainPost always has index 0
This commit is contained in:
barisusakli
2014-08-12 12:32:38 -04:00
parent 8584da75f2
commit 1cf5c3145a
3 changed files with 24 additions and 10 deletions

View File

@@ -110,7 +110,7 @@ define('navigator', ['forum/pagination'], function(pagination) {
navigator.scrollTop = function(index) {
if ($('li[data-index="' + index + '"]').length) {
navigator.scrollUp();
navigator.scrollToPost(index, true);
} else {
ajaxify.go(generateUrl());
}
@@ -118,7 +118,7 @@ define('navigator', ['forum/pagination'], function(pagination) {
navigator.scrollBottom = function(index) {
if ($('li[data-index="' + index + '"]').length) {
navigator.scrollDown();
navigator.scrollToPost(index, true);
} else {
index = parseInt(index, 10) + 1;
ajaxify.go(generateUrl(index));