From ab2580cc5f8e4f648263da1576ba836f224f9586 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Tue, 25 Nov 2014 23:20:29 -0500 Subject: [PATCH] fix human readable post count in topics --- public/src/client/topic/postTools.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/src/client/topic/postTools.js b/public/src/client/topic/postTools.js index e00f30a7c4..df0511f0fc 100644 --- a/public/src/client/topic/postTools.js +++ b/public/src/client/topic/postTools.js @@ -1,6 +1,6 @@ 'use strict'; -/* globals define, app, translator, ajaxify, socket, bootbox */ +/* globals define, app, utils, templates, translator, ajaxify, socket, bootbox */ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(composer, share, navigator) { @@ -29,7 +29,9 @@ define('forum/topic/postTools', ['composer', 'share', 'navigator'], function(com PostTools.updatePostCount = function() { socket.emit('topics.postcount', ajaxify.variables.get('topic_id'), function(err, postCount) { if (!err) { - $('.topic-post-count').html(postCount); + var postCountEl = $('.topic-post-count'); + postCountEl.html(postCount).attr('title', postCount); + utils.makeNumbersHumanReadable(postCountEl); navigator.setCount(postCount); } });