Skip to content

Node.js based forum software built for the modern web

closes #3732

barisusaklif6fa0ace3c1b
diff --git a/public/src/client/topic/events.js b/public/src/client/topic/events.js
index fe9196e7fb..47c7f2c328 100644
--- a/public/src/client/topic/events.js
+++ b/public/src/client/topic/events.js
@@ -162,6 +162,7 @@ define('forum/topic/events', [
function onPostPurged(pid) {
components.get('post', 'pid', pid).fadeOut(500, function() {
$(this).remove();
+ posts.showBottomPostBar();
});
postTools.updatePostCount();
diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js
index 4140d5e557..a4ef94d16c 100644
--- a/public/src/client/topic/postTools.js
+++ b/public/src/client/topic/postTools.js
@@ -40,7 +40,7 @@ define('forum/topic/postTools', ['share', 'navigator', 'components', 'translator
};
function addVoteHandler() {
- components.get('topic').on('mouseenter', '[data-pid] .votes', function() {
+ components.get('topic').on('mouseenter', '[data-pid] [component="post/vote-count"]', function() {
loadDataAndCreateTooltip($(this));
});
}
diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js
index 6ae9fbc8cb..c9f25760b5 100644
--- a/public/src/client/topic/posts.js
+++ b/public/src/client/topic/posts.js
@@ -223,14 +223,12 @@ define('forum/topic/posts', [
postTools.updatePostCount();
addBlockquoteEllipses(posts.find('[component="post/content"] > blockquote > blockquote'));
hidePostToolsForDeletedPosts(posts);
- showBottomPostBar();
+ Posts.showBottomPostBar();
};
- function showBottomPostBar() {
- if (components.get('post').length > 1 || !components.get('post', 'index', 0).length) {
- $('.bottom-post-bar').removeClass('hidden');
- }
- }
+ Posts.showBottomPostBar = function() {
+ $('.bottom-post-bar').toggleClass('hidden', components.get('post').length <= 1 && !!components.get('post', 'index', 0).length);
+ };
function hidePostToolsForDeletedPosts(posts) {
posts.each(function() {