This commit is contained in:
barisusakli
2015-10-15 12:18:21 -04:00
parent 94a0c9aa9f
commit f6fa0ace3c
3 changed files with 6 additions and 7 deletions

View File

@@ -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();

View File

@@ -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));
});
}

View File

@@ -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() {