mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-08 06:55:46 +01:00
removed relativeTime util method, utils.js better be a C now.
This commit is contained in:
@@ -25,11 +25,14 @@ define('notifications', ['sounds'], function(sound) {
|
||||
image = '';
|
||||
}
|
||||
|
||||
return '<li class="' + (notification.readClass || '') + '"><a href="' + (notification.path || '#') + '">' + image + '<span class="pull-right relTime">' + utils.relativeTime(notification.datetime, true) + '</span><span class="text">' + notification.bodyShort + '</span></a></li>';
|
||||
return '<li class="' + (notification.readClass || '') + '"><a href="' + (notification.path || '#') + '">' + image + '<span class="pull-right relTime">' + $.timeago(new Date(parseInt(notification.datetime, 10))) + '</span><span class="text">' + notification.bodyShort + '</span></a></li>';
|
||||
}
|
||||
|
||||
var x, html = '';
|
||||
|
||||
// Switch to shorthand
|
||||
translator.toggleTimeagoShorthand();
|
||||
|
||||
if (!err && (data.read.length + data.unread.length) > 0) {
|
||||
var image = '';
|
||||
for (x = 0; x < data.unread.length; x++) {
|
||||
@@ -43,6 +46,9 @@ define('notifications', ['sounds'], function(sound) {
|
||||
html += '<li class="no-notifs"><a>[[notifications:no_notifs]]</a></li>';
|
||||
}
|
||||
|
||||
// Switch back to original timeago strings
|
||||
translator.toggleTimeagoShorthand();
|
||||
|
||||
html += '<li class="pagelink"><a href="' + config.relative_path + '/notifications">[[notifications:see_all]]</a></li>';
|
||||
|
||||
notifList.translateHtml(html);
|
||||
|
||||
Reference in New Issue
Block a user