diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-10-07 10:51:08 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2018-10-07 10:51:08 +0300 |
commit | a1ae82be354ddf7c55bd378eff6b618a2734a499 (patch) | |
tree | 36944609a56f1493ccc4f70d21c6d25e45945719 /interface | |
parent | aeea55d92d3c417fcbafee474cdc16648a83a10c (diff) | |
download | rspamd-a1ae82be354ddf7c55bd378eff6b618a2734a499.tar.gz rspamd-a1ae82be354ddf7c55bd378eff6b618a2734a499.zip |
[WebUI] Fix symbol description tooltips display
when the total number of rows is less than number of rows per page
Diffstat (limited to 'interface')
-rw-r--r-- | interface/js/app/history.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/interface/js/app/history.js b/interface/js/app/history.js index ca6b21c47..1edd4bf28 100644 --- a/interface/js/app/history.js +++ b/interface/js/app/history.js @@ -624,14 +624,15 @@ define(["jquery", "footable", "humanize"], } ui.getHistory = function (rspamd, tables) { - function waitForRowsDisplayed(callback, iteration) { + function waitForRowsDisplayed(rows_total, callback, iteration) { var i = (typeof iteration === "undefined") ? 10 : iteration; var num_rows = $("#historyTable > tbody > tr").length; - if (num_rows === rows_per_page) { + if (num_rows === rows_per_page || + num_rows === rows_total) { return callback(); } else if (--i) { setTimeout(function () { - waitForRowsDisplayed(callback, i); + waitForRowsDisplayed(rows_total, callback, i); }, 500); } return null; @@ -676,7 +677,7 @@ define(["jquery", "footable", "humanize"], tables.history.rows.load(items); if (version) { // Non-legacy // Is there a way to get an event when all rows are loaded? - waitForRowsDisplayed(function () { + waitForRowsDisplayed(items.length, function () { drawTooltips(); }); } |