fix post-bar and post count

This commit is contained in:
barisusakli
2015-10-24 23:03:12 -04:00
parent c194f44791
commit 2a6f411eff
2 changed files with 7 additions and 2 deletions

View File

@@ -230,8 +230,11 @@ define('forum/topic/posts', [
Posts.showBottomPostBar = function() {
var mainPost = components.get('post', 'index', 0);
if (!!mainPost.length && $('[component="post"]').length > 1) {
var posts = $('[component="post"]');
if (!!mainPost.length && posts.length > 1 && $('.post-bar').length < 2) {
$('.post-bar').clone().appendTo(mainPost);
} else if (mainPost.length && posts.length < 2) {
mainPost.find('.post-bar').remove();
}
};