mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 12:05:57 +01:00
insert postbar after placeholder
This commit is contained in:
@@ -345,10 +345,11 @@ define('forum/topic/posts', [
|
|||||||
|
|
||||||
Posts.showBottomPostBar = function() {
|
Posts.showBottomPostBar = function() {
|
||||||
var mainPost = components.get('post', 'index', 0);
|
var mainPost = components.get('post', 'index', 0);
|
||||||
|
var placeHolder = $('.post-bar-placeholder');
|
||||||
var posts = $('[component="post"]');
|
var posts = $('[component="post"]');
|
||||||
if (!!mainPost.length && posts.length > 1 && $('.post-bar').length < 2 && $('.post-bar-placeholder').length) {
|
if (!!mainPost.length && posts.length > 1 && $('.post-bar').length < 2 && placeHolder.length) {
|
||||||
$('.post-bar').clone().appendTo(mainPost);
|
$('.post-bar').clone().insertAfter(placeHolder);
|
||||||
$('.post-bar-placeholder').remove();
|
placeHolder.remove();
|
||||||
} else if (mainPost.length && posts.length < 2) {
|
} else if (mainPost.length && posts.length < 2) {
|
||||||
mainPost.find('.post-bar').remove();
|
mainPost.find('.post-bar').remove();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user