|
|
@ -43,7 +43,7 @@ define('forum/chats', [
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
Chats.init = function () {
|
|
|
|
Chats.init = function () {
|
|
|
|
$('.chats-full [data-bs-toggle="tooltip"]').tooltip();
|
|
|
|
$('.chats-full [data-bs-toggle="tooltip"]').tooltip({ trigger: 'hover', container: '#content' });
|
|
|
|
socket.emit('modules.chats.enterPublic', ajaxify.data.publicRooms.map(r => r.roomId));
|
|
|
|
socket.emit('modules.chats.enterPublic', ajaxify.data.publicRooms.map(r => r.roomId));
|
|
|
|
const env = utils.findBootstrapEnvironment();
|
|
|
|
const env = utils.findBootstrapEnvironment();
|
|
|
|
chatNavWrapper = $('[component="chat/nav-wrapper"]');
|
|
|
|
chatNavWrapper = $('[component="chat/nav-wrapper"]');
|
|
|
@ -104,7 +104,7 @@ define('forum/chats', [
|
|
|
|
Chats.addNotificationSettingHandler(roomId, mainWrapper);
|
|
|
|
Chats.addNotificationSettingHandler(roomId, mainWrapper);
|
|
|
|
messageSearch.init(roomId, mainWrapper);
|
|
|
|
messageSearch.init(roomId, mainWrapper);
|
|
|
|
Chats.addPublicRoomSortHandler();
|
|
|
|
Chats.addPublicRoomSortHandler();
|
|
|
|
Chats.addTooltipHandler();
|
|
|
|
Chats.addTooltipHandler(mainWrapper);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Chats.addPublicRoomSortHandler = function () {
|
|
|
|
Chats.addPublicRoomSortHandler = function () {
|
|
|
@ -128,8 +128,12 @@ define('forum/chats', [
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Chats.addTooltipHandler = function () {
|
|
|
|
Chats.addTooltipHandler = function (containerEl) {
|
|
|
|
$('[data-manual-tooltip]').tooltip({
|
|
|
|
if (utils.isMobile()) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
containerEl.find('[data-manual-tooltip]').tooltip({
|
|
|
|
trigger: 'manual',
|
|
|
|
trigger: 'manual',
|
|
|
|
animation: false,
|
|
|
|
animation: false,
|
|
|
|
placement: 'bottom',
|
|
|
|
placement: 'bottom',
|
|
|
@ -142,6 +146,13 @@ define('forum/chats', [
|
|
|
|
}).on('click mouseleave', function () {
|
|
|
|
}).on('click mouseleave', function () {
|
|
|
|
$(this).tooltip('hide');
|
|
|
|
$(this).tooltip('hide');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
containerEl.tooltip({
|
|
|
|
|
|
|
|
selector: '[component="chat/message/controls"] button',
|
|
|
|
|
|
|
|
placement: 'top',
|
|
|
|
|
|
|
|
container: '#content',
|
|
|
|
|
|
|
|
animation: false,
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
Chats.addNotificationSettingHandler = function (roomId, containerEl) {
|
|
|
|
Chats.addNotificationSettingHandler = function (roomId, containerEl) {
|
|
|
@ -524,7 +535,7 @@ define('forum/chats', [
|
|
|
|
ajaxify.data = { ...ajaxify.data, ...payload, roomId: roomId };
|
|
|
|
ajaxify.data = { ...ajaxify.data, ...payload, roomId: roomId };
|
|
|
|
ajaxify.updateTitle(ajaxify.data.title);
|
|
|
|
ajaxify.updateTitle(ajaxify.data.title);
|
|
|
|
$('body').toggleClass('chat-loaded', !!roomId);
|
|
|
|
$('body').toggleClass('chat-loaded', !!roomId);
|
|
|
|
mainWrapper.find('[data-bs-toggle="tooltip"]').tooltip();
|
|
|
|
mainWrapper.find('[data-bs-toggle="tooltip"]').tooltip({ trigger: 'hover', container: '#content' });
|
|
|
|
Chats.setActive(roomId);
|
|
|
|
Chats.setActive(roomId);
|
|
|
|
Chats.addEventListeners();
|
|
|
|
Chats.addEventListeners();
|
|
|
|
hooks.fire('action:chat.loaded', $('.chats-full'));
|
|
|
|
hooks.fire('action:chat.loaded', $('.chats-full'));
|
|
|
|