|
|
|
@ -3,7 +3,8 @@
|
|
|
|
|
define('chat', [
|
|
|
|
|
'components',
|
|
|
|
|
'taskbar',
|
|
|
|
|
], function (components, taskbar) {
|
|
|
|
|
'translator',
|
|
|
|
|
], function (components, taskbar, translator) {
|
|
|
|
|
var module = {};
|
|
|
|
|
var newMessage = false;
|
|
|
|
|
|
|
|
|
@ -20,6 +21,11 @@ define('chat', [
|
|
|
|
|
return room.teaser;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
translator.toggleTimeagoShorthand(function () {
|
|
|
|
|
for (var i = 0; i < rooms.length; i += 1) {
|
|
|
|
|
rooms[i].teaser.timeago = $.timeago(new Date(parseInt(rooms[i].teaser.timestamp, 10)));
|
|
|
|
|
}
|
|
|
|
|
translator.toggleTimeagoShorthand();
|
|
|
|
|
app.parseAndTranslate('partials/chats/dropdown', { rooms: rooms }, function (html) {
|
|
|
|
|
chatsListEl.find('*').not('.navigation-link').remove();
|
|
|
|
|
chatsListEl.prepend(html);
|
|
|
|
@ -45,6 +51,7 @@ define('chat', [
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|