Skip to content

Node.js based forum software built for the modern web

allow timeago to be cast on other elements as well, ex. small

psychobunny412c5360a6a4
diff --git a/public/src/app.js b/public/src/app.js
index fdfe7856b3..8974d2316a 100644
--- a/public/src/app.js
+++ b/public/src/app.js
@@ -234,7 +234,7 @@ app.cacheBuster = null;
app.processPage = function () {
highlightNavigationLink();
- $('span.timeago').timeago();
+ $('.timeago').timeago();
utils.makeNumbersHumanReadable($('.human-readable-number'));
diff --git a/public/src/client/account/favourites.js b/public/src/client/account/favourites.js
index 6a08a814a5..f73e1d4f20 100644
--- a/public/src/client/account/favourites.js
+++ b/public/src/client/account/favourites.js
@@ -34,7 +34,7 @@ define('forum/account/favourites', ['forum/account/header', 'forum/infinitescrol
infinitescroll.parseAndTranslate('account/favourites', 'posts', {posts: posts}, function(html) {
$('.user-favourite-posts').append(html);
html.find('img').addClass('img-responsive');
- html.find('span.timeago').timeago();
+ html.find('.timeago').timeago();
app.createUserTooltips();
utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
callback();
diff --git a/public/src/client/account/posts.js b/public/src/client/account/posts.js
index 70410e0819..c4759b9016 100644
--- a/public/src/client/account/posts.js
+++ b/public/src/client/account/posts.js
@@ -35,7 +35,7 @@ define('forum/account/posts', ['forum/account/header', 'forum/infinitescroll'],
infinitescroll.parseAndTranslate('account/posts', 'posts', {posts: posts}, function(html) {
$('.user-favourite-posts').append(html);
html.find('img').addClass('img-responsive');
- html.find('span.timeago').timeago();
+ html.find('.timeago').timeago();
app.createUserTooltips();
utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
callback();
diff --git a/public/src/client/account/profile.js b/public/src/client/account/profile.js
index 89a555a702..5bbf48fe85 100644
--- a/public/src/client/account/profile.js
+++ b/public/src/client/account/profile.js
@@ -116,7 +116,7 @@ define('forum/account/profile', ['forum/account/header', 'forum/infinitescroll']
infinitescroll.parseAndTranslate('account/profile', 'posts', {posts: posts}, function(html) {
$('.user-recent-posts .loading-indicator').before(html);
- html.find('span.timeago').timeago();
+ html.find('.timeago').timeago();
callback();
});
diff --git a/public/src/client/account/topics.js b/public/src/client/account/topics.js
index c556ef2891..107352db97 100644
--- a/public/src/client/account/topics.js
+++ b/public/src/client/account/topics.js
@@ -33,7 +33,7 @@ define('forum/account/topics', ['forum/account/header', 'forum/infinitescroll'],
function onTopicsLoaded(topics, callback) {
infinitescroll.parseAndTranslate('account/topics', 'topics', {topics: topics}, function(html) {
$('#topics-container').append(html);
- html.find('span.timeago').timeago();
+ html.find('.timeago').timeago();
app.createUserTooltips();
utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
$(window).trigger('action:topics.loaded');
diff --git a/public/src/client/account/watched.js b/public/src/client/account/watched.js
index 9a502b1ee8..3514301c4d 100644
--- a/public/src/client/account/watched.js
+++ b/public/src/client/account/watched.js
@@ -31,7 +31,7 @@ define('forum/account/watched', ['forum/account/header', 'forum/infinitescroll']
function onTopicsLoaded(topics, callback) {
infinitescroll.parseAndTranslate('account/watched', 'topics', {topics: topics}, function(html) {
$('#topics-container').append(html);
- html.find('span.timeago').timeago();
+ html.find('.timeago').timeago();
app.createUserTooltips();
utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
$(window).trigger('action:topics.loaded');
diff --git a/public/src/client/categories.js b/public/src/client/categories.js
index d3cf1cae43..9ef4bee6f6 100644
--- a/public/src/client/categories.js
+++ b/public/src/client/categories.js
@@ -67,7 +67,7 @@ define('forum/categories', function() {
translator.translate(html, function(translatedHTML) {
translatedHTML = $(translatedHTML);
translatedHTML.find('img').addClass('img-responsive');
- translatedHTML.find('span.timeago').timeago();
+ translatedHTML.find('.timeago').timeago();
callback(translatedHTML);
});
});
diff --git a/public/src/client/category.js b/public/src/client/category.js
index 3b6a0e69b9..9b44708fd1 100644
--- a/public/src/client/category.js
+++ b/public/src/client/category.js
@@ -228,7 +228,7 @@ define('forum/category', [
topic.hide().fadeIn('slow');
- topic.find('span.timeago').timeago();
+ topic.find('.timeago').timeago();
app.createUserTooltips();
updateTopicCount();
@@ -304,7 +304,7 @@ define('forum/category', [
if (typeof callback === 'function') {
callback();
}
- html.find('span.timeago').timeago();
+ html.find('.timeago').timeago();
app.createUserTooltips();
utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
});
diff --git a/public/src/client/chats.js b/public/src/client/chats.js
index cde94aa71a..9ea8beea57 100644
--- a/public/src/client/chats.js
+++ b/public/src/client/chats.js
@@ -122,7 +122,7 @@ define('forum/chats', ['string', 'sounds', 'forum/infinitescroll'], function(S,
function onMessagesParsed(html) {
var newMessage = $(html);
newMessage.insertBefore($('.user-typing'));
- newMessage.find('span.timeago').timeago();
+ newMessage.find('.timeago').timeago();
newMessage.find('img:not(".chat-user-image")').addClass('img-responsive');
Chats.scrollToBottom($('.expanded-chat .chat-content'));
}
diff --git a/public/src/client/notifications.js b/public/src/client/notifications.js
index fb778ec18f..4e7244f83f 100644
--- a/public/src/client/notifications.js
+++ b/public/src/client/notifications.js
@@ -16,7 +16,7 @@ define('forum/notifications', function() {
});
});
- $('span.timeago').timeago();
+ $('.timeago').timeago();
$('.notifications .delete').on('click', function() {
socket.emit('notifications.markAllRead', function(err) {
diff --git a/public/src/client/recent.js b/public/src/client/recent.js
index 05e936a577..2be859f65c 100644
--- a/public/src/client/recent.js
+++ b/public/src/client/recent.js
@@ -125,7 +125,7 @@ define('forum/recent', ['forum/infinitescroll', 'composer'], function(infinitesc
$('#category-no-topics').remove();
$('#topics-container').append(html);
- html.find('span.timeago').timeago();
+ html.find('.timeago').timeago();
app.createUserTooltips();
utils.makeNumbersHumanReadable(html.find('.human-readable-number'));
$(window).trigger('action:topics.loaded');
diff --git a/public/src/client/topic/posts.js b/public/src/client/topic/posts.js
index 8731121de1..6fdb6282e9 100644
--- a/public/src/client/topic/posts.js
+++ b/public/src/client/topic/posts.js
@@ -224,7 +224,7 @@ define('forum/topic/posts', [
app.replaceSelfLinks(element.find('a'));
utils.addCommasToNumbers(element.find('.formatted-number'));
utils.makeNumbersHumanReadable(element.find('.human-readable-number'));
- element.find('span.timeago').timeago();
+ element.find('.timeago').timeago();
element.find('.post-content img:not(.emoji)').addClass('img-responsive').each(function() {
var $this = $(this);
if (!$this.parent().is('a')) {
diff --git a/public/src/modules/chat.js b/public/src/modules/chat.js
index 5d60f2d411..760f19ca20 100644
--- a/public/src/modules/chat.js
+++ b/public/src/modules/chat.js
@@ -406,7 +406,7 @@ define('chat', ['taskbar', 'string', 'sounds', 'forum/chats'], function(taskbar,
Chats.parseMessage(data, function(html) {
var message = $(html);
message.find('img:not(".chat-user-image")').addClass('img-responsive');
- message.find('span.timeago').timeago();
+ message.find('.timeago').timeago();
message.insertBefore(typingNotif);
Chats.scrollToBottom(chatContent);
diff --git a/public/src/translator.js b/public/src/translator.js
index a6f4027faf..d1b85e300c 100644
--- a/public/src/translator.js
+++ b/public/src/translator.js
@@ -79,7 +79,7 @@
}
$.getScript(RELATIVE_PATH + '/vendor/jquery/timeago/locales/jquery.timeago.' + languageCode + '.js').success(function() {
- $('span.timeago').timeago();
+ $('.timeago').timeago();
}).fail(function() {
$.getScript(RELATIVE_PATH + '/vendor/jquery/timeago/locales/jquery.timeago.en.js');
});
diff --git a/public/src/widgets.js b/public/src/widgets.js
index 990a42c6f0..e83353ec1b 100644
--- a/public/src/widgets.js
+++ b/public/src/widgets.js
@@ -71,7 +71,7 @@
var widgetAreas = $('#content [widget-area]');
widgetAreas.find('img:not(.user-img)').addClass('img-responsive');
- widgetAreas.find('span.timeago').timeago();
+ widgetAreas.find('.timeago').timeago();
widgetAreas.find('img[title].teaser-pic,img[title].user-img').each(function() {
$(this).tooltip({
placement: 'top',