From: bjoe2k4 Date: Sun, 25 Mar 2018 16:05:31 +0000 (+0200) Subject: [WebUI] History: Fix Tooltips on paging, filtering and sorting X-Git-Tag: 1.7.3~112^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2115%2Fhead;p=thirdparty%2Frspamd.git [WebUI] History: Fix Tooltips on paging, filtering and sorting Also adds Tooltips to history of specific nodes. --- diff --git a/interface/js/app/history.js b/interface/js/app/history.js index 50a7147500..ff23906b79 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -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 } }); }