From df3b7e2dbc51e761800eb1da69f699cdadb9899d Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 21 Sep 2016 16:35:03 -0500 Subject: [PATCH 1/2] Adds utility method to remove tooltips. --- modules/UI/util/UIUtil.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/UI/util/UIUtil.js b/modules/UI/util/UIUtil.js index 81e296f31..531a56068 100644 --- a/modules/UI/util/UIUtil.js +++ b/modules/UI/util/UIUtil.js @@ -113,6 +113,15 @@ import KeyboardShortcut from '../../keyboardshortcut/keyboardshortcut'; }); }, + /** + * Removes the tooltip to the given element. + * + * @param element the element to remove the tooltip from + */ + removeTooltip: function (element) { + AJS.$(element).tooltip('destroy'); + }, + /** * Internal util function for generating tooltip title. * From 4ab0fca4d72e5639d4eec41a0e780a6bbc46e9d5 Mon Sep 17 00:00:00 2001 From: damencho Date: Wed, 21 Sep 2016 16:35:42 -0500 Subject: [PATCH 2/2] Removes tooltip from profile avatar when not clickable. --- modules/UI/toolbars/Toolbar.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.js index f7576cf52..d4812d141 100644 --- a/modules/UI/toolbars/Toolbar.js +++ b/modules/UI/toolbars/Toolbar.js @@ -407,6 +407,8 @@ const Toolbar = { if(!APP.tokenData.isGuest) { $("#toolbar_button_profile").addClass("unclickable"); + UIUtil.removeTooltip( + document.getElementById('toolbar_button_profile')); } }, /**