|
|
|
@ -54,12 +54,20 @@ $(document).ready(function() {
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
socket.on('event:chats.markedAsRead', function(data) {
|
|
|
|
|
$('#taskbar [data-roomId="' + data.roomId + '"]')
|
|
|
|
|
.removeClass('new')
|
|
|
|
|
.attr('data-content', 0);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function createChatIcon(data) {
|
|
|
|
|
data.options.icon = 'fa-spinner fa-spin';
|
|
|
|
|
|
|
|
|
|
$.getJSON(config.relative_path + '/api/user/' + utils.slugify(data.options.title), function(user) {
|
|
|
|
|
var el = $('#taskbar [data-uuid="' + data.uuid + '"] a');
|
|
|
|
|
el.find('i').remove();
|
|
|
|
|
el.parent('[data-uuid]').attr('data-roomId', data.options.roomId);
|
|
|
|
|
|
|
|
|
|
if (user.picture) {
|
|
|
|
|
el.css('background-image', 'url(' + user.picture + ')');
|
|
|
|
|
} else {
|
|
|
|
|