mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
bottom bar change
This commit is contained in:
@@ -211,6 +211,7 @@ define('forum/topic/posts', [
|
|||||||
};
|
};
|
||||||
|
|
||||||
Posts.processPage = function(posts) {
|
Posts.processPage = function(posts) {
|
||||||
|
Posts.showBottomPostBar();
|
||||||
app.createUserTooltips(posts);
|
app.createUserTooltips(posts);
|
||||||
app.replaceSelfLinks(posts.find('a'));
|
app.replaceSelfLinks(posts.find('a'));
|
||||||
utils.addCommasToNumbers(posts.find('.formatted-number'));
|
utils.addCommasToNumbers(posts.find('.formatted-number'));
|
||||||
@@ -225,11 +226,13 @@ define('forum/topic/posts', [
|
|||||||
|
|
||||||
addBlockquoteEllipses(posts.find('[component="post/content"] > blockquote > blockquote'));
|
addBlockquoteEllipses(posts.find('[component="post/content"] > blockquote > blockquote'));
|
||||||
hidePostToolsForDeletedPosts(posts);
|
hidePostToolsForDeletedPosts(posts);
|
||||||
Posts.showBottomPostBar();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Posts.showBottomPostBar = function() {
|
Posts.showBottomPostBar = function() {
|
||||||
$('.bottom-post-bar').toggleClass('hidden', components.get('post').length <= 1 && !!components.get('post', 'index', 0).length);
|
var mainPost = components.get('post', 'index', 0);
|
||||||
|
if (!!mainPost.length && $('[component="post"]').length > 1) {
|
||||||
|
$('.post-bar').clone().appendTo(mainPost);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function hidePostToolsForDeletedPosts(posts) {
|
function hidePostToolsForDeletedPosts(posts) {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move', 'comp
|
|||||||
};
|
};
|
||||||
|
|
||||||
function renderMenu() {
|
function renderMenu() {
|
||||||
function render() {
|
$('.topic').on('show.bs.dropdown', '.thread-tools', function () {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var dropdownMenu = $this.find('.dropdown-menu');
|
var dropdownMenu = $this.find('.dropdown-menu');
|
||||||
if (dropdownMenu.html()) {
|
if (dropdownMenu.html()) {
|
||||||
@@ -115,10 +115,7 @@ define('forum/topic/threadTools', ['forum/topic/fork', 'forum/topic/move', 'comp
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
});
|
||||||
|
|
||||||
$('[component="topic"]').on('show.bs.dropdown', '.thread-tools', render);
|
|
||||||
$('.bottom-post-bar').on('show.bs.dropdown', '.thread-tools', render);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function topicCommand(command, tid) {
|
function topicCommand(command, tid) {
|
||||||
|
|||||||
Reference in New Issue
Block a user