From 1a43b3482c1aafc9cbe95857b012fd84cbd6e30b Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 6 Jul 2016 12:25:57 +0300 Subject: [PATCH] insert postbar after placeholder --- public/src/client/topic/posts.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js index aaf188c591..c656b899a2 100644 --- a/public/src/client/topic/posts.js +++ b/public/src/client/topic/posts.js @@ -345,10 +345,11 @@ define('forum/topic/posts', [ Posts.showBottomPostBar = function() { var mainPost = components.get('post', 'index', 0); + var placeHolder = $('.post-bar-placeholder'); var posts = $('[component="post"]'); - if (!!mainPost.length && posts.length > 1 && $('.post-bar').length < 2 && $('.post-bar-placeholder').length) { - $('.post-bar').clone().appendTo(mainPost); - $('.post-bar-placeholder').remove(); + if (!!mainPost.length && posts.length > 1 && $('.post-bar').length < 2 && placeHolder.length) { + $('.post-bar').clone().insertAfter(placeHolder); + placeHolder.remove(); } else if (mainPost.length && posts.length < 2) { mainPost.find('.post-bar').remove(); }