|
|
@ -95,24 +95,26 @@ $(document).ready(function () {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function setupTaskbar() {
|
|
|
|
function setupTaskbar() {
|
|
|
|
$(window).on('filter:taskbar.push', function (ev, data) {
|
|
|
|
require(['hooks'], (hooks) => {
|
|
|
|
data.options.className = 'taskbar-' + data.module;
|
|
|
|
hooks.on('filter:taskbar.push', (data) => {
|
|
|
|
if (data.module === 'composer') {
|
|
|
|
data.options.className = 'taskbar-' + data.module;
|
|
|
|
data.options.icon = 'fa-commenting-o';
|
|
|
|
if (data.module === 'composer') {
|
|
|
|
} else if (data.module === 'chat') {
|
|
|
|
data.options.icon = 'fa-commenting-o';
|
|
|
|
if (data.element.length && !data.element.hasClass('active')) {
|
|
|
|
} else if (data.module === 'chat') {
|
|
|
|
increaseChatCount(data.element);
|
|
|
|
if (data.element.length && !data.element.hasClass('active')) {
|
|
|
|
|
|
|
|
increaseChatCount(data.element);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
hooks.on('action:taskbar.pushed', (data) => {
|
|
|
|
$(window).on('action:taskbar.pushed', function (ev, data) {
|
|
|
|
if (data.module === 'chat') {
|
|
|
|
if (data.module === 'chat') {
|
|
|
|
createChatIcon(data);
|
|
|
|
createChatIcon(data);
|
|
|
|
var elData = data.element.data();
|
|
|
|
var elData = data.element.data();
|
|
|
|
if (elData && elData.options && !elData.options.isSelf) {
|
|
|
|
if (elData && elData.options && !elData.options.isSelf) {
|
|
|
|
increaseChatCount(data.element);
|
|
|
|
increaseChatCount(data.element);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
socket.on('event:chats.markedAsRead', function (data) {
|
|
|
|
socket.on('event:chats.markedAsRead', function (data) {
|
|
|
|