add some missing tooltips

isekai-main
Barış Soner Uşaklı 1 year ago
parent 31305d64ba
commit 26d06d9bb0

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

@ -280,6 +280,7 @@ define('chat', [
chatModal.css('position', 'fixed');
chatModal.appendTo($('body'));
chatModal.find('.timeago').timeago();
chatModal.find('[data-bs-toggle="tooltip"]').tooltip({ trigger: 'hover', container: '#content' });
ChatsMessages.wrapImagesInLinks(chatModal.find('[component="chat/messages"] .chat-content'));
module.center(chatModal);
@ -370,7 +371,7 @@ define('chat', [
Chats.addCharactersLeftHandler(chatModal);
Chats.addTextareaResizeHandler(chatModal);
Chats.addIPHandler(chatModal);
Chats.addTooltipHandler(chatModal);
Chats.addUploadHandler({
dragDropAreaEl: chatModal.find('.modal-content'),
pasteEl: chatModal,

Loading…
Cancel
Save