mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-11 07:00:51 +01:00
fix bs tooltips, update status tooltips
see https://github.com/twbs/bootstrap/issues/32372
This commit is contained in:
@@ -43,7 +43,9 @@ define('admin/dashboard', [
|
||||
|
||||
isMobile = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
|
||||
$('[data-bs-toggle="tooltip"]').tooltip();
|
||||
$('[data-bs-toggle="tooltip"]').tooltip({
|
||||
animation: false,
|
||||
});
|
||||
|
||||
setupRealtimeButton();
|
||||
setupGraphs(function () {
|
||||
|
||||
@@ -243,6 +243,7 @@ if (document.readyState === 'loading') {
|
||||
selector: '.avatar',
|
||||
placement: placement || 'top',
|
||||
container: '#content',
|
||||
animation: false,
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -252,6 +253,18 @@ if (document.readyState === 'loading') {
|
||||
$('body').tooltip({
|
||||
selector: '.fa-circle.status',
|
||||
placement: 'top',
|
||||
container: '#content',
|
||||
animation: false,
|
||||
});
|
||||
|
||||
$('#content').on('inserted.bs.tooltip', function (ev) {
|
||||
const target = $(ev.target);
|
||||
if (target.attr('component') === 'user/status') {
|
||||
const newTitle = target.attr('data-new-title');
|
||||
if (newTitle) {
|
||||
$('.tooltip .tooltip-inner').text(newTitle);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -296,8 +309,7 @@ if (document.readyState === 'loading') {
|
||||
translator.translate('[[global:' + status + ']]', function (translated) {
|
||||
el.removeClass('online offline dnd away')
|
||||
.addClass(status)
|
||||
.attr('title', translated)
|
||||
.attr('data-original-title', translated);
|
||||
.attr('data-new-title', translated)
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
@@ -24,6 +24,7 @@ define('forum/categories', ['components', 'categorySelector', 'hooks'], function
|
||||
|
||||
$('.category-header').tooltip({
|
||||
placement: 'bottom',
|
||||
animation: false,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
@@ -49,6 +49,7 @@ define('forum/header', [
|
||||
placement: 'bottom',
|
||||
trigger: 'hover',
|
||||
container: 'body',
|
||||
animation: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ define('forum/topic/threadTools', [
|
||||
|
||||
$('.topic-main-buttons [title]').tooltip({
|
||||
container: '#content',
|
||||
animation: false,
|
||||
});
|
||||
|
||||
// function topicCommand(method, path, command, onComplete) {
|
||||
|
||||
@@ -199,6 +199,7 @@ app = window.app || {};
|
||||
|
||||
reconnectEl.addClass('active').removeClass('hide').tooltip({
|
||||
placement: 'bottom',
|
||||
animation: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user