]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[WebUI] History: Fix Tooltips on paging, filtering and sorting 2115/head
authorbjoe2k4 <bjoe2k4@users.noreply.github.com>
Sun, 25 Mar 2018 16:05:31 +0000 (18:05 +0200)
committerGitHub <noreply@github.com>
Sun, 25 Mar 2018 16:05:31 +0000 (18:05 +0200)
Also adds Tooltips to history of specific nodes.

interface/js/app/history.js

index 50a71475005e17d662380c87d45f508d73270fd7..ff23906b7991d5351353e0221fdcd7f8966a3129 100644 (file)
@@ -482,6 +482,17 @@ function($, _, Humanize) {
         }
         });
 
+        var drawTooltips = function() {
+            // Update symbol description tooltips
+            $.each(symbolDescriptions, function (key, description) {
+                $('abbr[data-sym-key=' + key + ']').tooltip({
+                    "placement": "bottom",
+                    "html": true,
+                    "title": description
+                });
+            });
+        }
+
         if (checked_server === "All SERVERS") {
             rspamd.queryNeighbours("history", function (req_data) {
                 function differentVersions() {
@@ -533,16 +544,10 @@ function($, _, Humanize) {
                             "filtering": FooTable.actionFilter
                         },
                         "on": {
-                               "ready.ft.table": function () {
-                                       // Update symbol description tooltips
-                                       $.each(symbolDescriptions, function (key, description) {
-                                               $('abbr[data-sym-key=' + key + ']').tooltip({
-                                                       "placement": "bottom",
-                                                       "html": true,
-                                                       "title": description
-                                               });
-                                       });
-                               }
+                           "ready.ft.table": drawTooltips,
+                           "after.ft.sorting": drawTooltips,
+                           "after.ft.paging": drawTooltips,
+                           "after.ft.filtering": drawTooltips
                         }
                     });
                 } else {
@@ -582,8 +587,14 @@ function($, _, Humanize) {
                         "sorting": {
                             "enabled": true
                         },
-                        components: {
-                            filtering: FooTable.actionFilter
+                        "components": {
+                            "filtering": FooTable.actionFilter
+                        },
+                        "on": {
+                           "ready.ft.table": drawTooltips,
+                           "after.ft.sorting": drawTooltips,
+                           "after.ft.paging": drawTooltips,
+                           "after.ft.filtering": drawTooltips
                         }
                     });
                 }