diff --git a/public/language/en-GB/global.json b/public/language/en-GB/global.json index f1ee75200e..33f0e48d86 100644 --- a/public/language/en-GB/global.json +++ b/public/language/en-GB/global.json @@ -108,6 +108,7 @@ "moderator_tools": "Moderator Tools", + "status": "Status", "online": "Online", "away": "Away", "dnd": "Do not disturb", diff --git a/public/src/app.js b/public/src/app.js index 88a2741281..1a2e0c8a90 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -238,25 +238,14 @@ if (document.readyState === 'loading') { } app.createUserTooltips = function (els, placement) { - if (isTouchDevice) { - return; - } - els = els || $('body'); - els.find('.avatar,img[title].teaser-pic,img[title].user-img,div.user-icon,span.user-icon').one('mouseenter', function (ev) { - const $this = $(this); - const title = $this.attr('title'); - if (!title) { - return; - } - // perf: create tooltips on demand - $this.tooltip({ - placement: placement || $this.attr('title-placement') || 'top', - title: $this.attr('title'), + if (!isTouchDevice) { + els = els || $('body'); + els.tooltip({ + selector: '.avatar', + placement: placement || 'top', container: '#content', }); - // this will cause the tooltip to show up - $this.trigger(ev); - }); + } }; app.createStatusTooltips = function () { diff --git a/public/src/client/header.js b/public/src/client/header.js index 6c880a972d..7d12c41cbf 100644 --- a/public/src/client/header.js +++ b/public/src/client/header.js @@ -43,12 +43,11 @@ define('forum/header', [ if (env === 'xs' || env === 'sm' || utils.isTouchDevice()) { return; } - $('#header-menu #main-nav li[title]').each(function () { - $(this).tooltip({ - placement: 'bottom', - trigger: 'hover', - title: $(this).attr('title'), - }); + + $('#header-menu #main-nav').tooltip({ + selector: '.nav-item', + placement: 'bottom', + trigger: 'hover', }); }