commit 4bca9b6: [WebUI] Disable bootstrap tooltips

moisseev moiseev at mezonplus.ru
Tue Jun 22 18:28:04 UTC 2021


Author: moisseev
Date: 2021-06-22 20:53:44 +0300
URL: https://github.com/rspamd/rspamd/commit/4bca9b6cd9a442421349bfbb1ccd5d2e1ab1608f (refs/pull/3803/head)

[WebUI] Disable bootstrap tooltips
that are too difficult to handle properly for dynamic HTML content.

---
 interface/js/app/rspamd.js | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js
index a99cbd4fb..171812a0c 100644
--- a/interface/js/app/rspamd.js
+++ b/interface/js/app/rspamd.js
@@ -436,7 +436,6 @@ function ($, D3pie, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_
             }
 
             $("#settings").popover({
-                title: "WebUI settings",
                 container: "body",
                 placement: "bottom",
                 html: true,
@@ -445,6 +444,9 @@ function ($, D3pie, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_
                     // Using .clone() has the side-effect of producing elements with duplicate id attributes.
                     return $("#settings-popover").clone();
                 }
+            // Restore the tooltip of the element that the popover is attached to.
+            }).attr("title", function () {
+                return $(this).attr("data-original-title");
             });
             $("#settings").on("click", function (e) {
                 e.preventDefault();
@@ -508,12 +510,6 @@ function ($, D3pie, visibility, NProgress, stickyTabs, tab_stat, tab_graph, tab_
             tabClick("#" + $("#navBar > ul > .nav-item > .nav-link.active").attr("id"));
         });
 
-        $("body").tooltip({
-            selector: ".symbol-default abbr[title]",
-            placement: "left",
-            html: true
-        });
-
         // Radio buttons
         $(document).on("click", "input:radio[name=\"clusterName\"]", function () {
             if (!this.disabled) {


More information about the Commits mailing list