Skip to content

Node.js based forum software built for the modern web

stricter selector for human readable numbers

Baris Usakli1660d75205f1
diff --git a/public/src/app.js b/public/src/app.js
index 75270eb325..482cf0c0d1 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -297,8 +297,8 @@ var socket,
});
}
- app.makeNumbersHumanReadable = function(selector) {
- $(selector).each(function() {
+ app.makeNumbersHumanReadable = function(elements) {
+ elements.each(function() {
$(this).html(utils.makeNumberHumanReadable($(this).attr('title')));
});
}
@@ -311,7 +311,7 @@ var socket,
$('span.timeago').timeago();
$('.post-content img').addClass('img-responsive');
- app.makeNumbersHumanReadable('.human-readable-number');
+ app.makeNumbersHumanReadable($('.human-readable-number');
app.createUserTooltips();
diff --git a/public/src/forum/category.js b/public/src/forum/category.js
index c6f8d5da01..77daf9994c 100644
--- a/public/src/forum/category.js
+++ b/public/src/forum/category.js
@@ -143,7 +143,7 @@ define(function () {
container.append(html);
$('#topics-container span.timeago').timeago();
- app.makeNumbersHumanReadable('#topics-container .human-readable-number');
+ app.makeNumbersHumanReadable($(html).find('.human-readable-number'));
}
Category.loadMoreTopics = function(cid) {
diff --git a/public/src/forum/recent.js b/public/src/forum/recent.js
index 437eb538c2..4614c2f404 100644
--- a/public/src/forum/recent.js
+++ b/public/src/forum/recent.js
@@ -91,7 +91,7 @@ define(function() {
container.append(html);
$('span.timeago').timeago();
- app.makeNumbersHumanReadable('#topics-container .human-readable-number');
+ app.makeNumbersHumanReadable($(html).find('.human-readable-number'));
}
Recent.loadMoreTopics = function() {
diff --git a/public/src/forum/unread.js b/public/src/forum/unread.js
index ea332be0f9..60c4ba4953 100644
--- a/public/src/forum/unread.js
+++ b/public/src/forum/unread.js
@@ -81,7 +81,7 @@ define(function() {
container.append(html);
$('span.timeago').timeago();
- app.makeNumbersHumanReadable('#topics-container .human-readable-number');
+ app.makeNumbersHumanReadable($(html).find('.human-readable-number'));
}
function loadMoreTopics() {