diff options
author | moisseev <moiseev@mezonplus.ru> | 2023-04-05 17:07:31 +0300 |
---|---|---|
committer | moisseev <moiseev@mezonplus.ru> | 2023-04-05 17:07:31 +0300 |
commit | 62f6a211838d8ebb48fa9acca773b123a820231f (patch) | |
tree | 8ebc515b88166e91619264bad504ff336ac160cc /interface/js | |
parent | e9fec3409a40bc89000d97130239a5867a1d6eb7 (diff) | |
download | rspamd-62f6a211838d8ebb48fa9acca773b123a820231f.tar.gz rspamd-62f6a211838d8ebb48fa9acca773b123a820231f.zip |
[WebUI] Fix "Clean history" button
enabling/disabling in the Scan tab
Diffstat (limited to 'interface/js')
-rw-r--r-- | interface/js/app/upload.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js index 59cd7514e..f9f6c53c6 100644 --- a/interface/js/app/upload.js +++ b/interface/js/app/upload.js @@ -152,6 +152,7 @@ define(["jquery"], function scrollTop(rows_total) { // Is there a way to get an event when all rows are loaded? rspamd.waitForRowsDisplayed("scan", rows_total, function () { + $("#cleanScanHistory").removeAttr("disabled", true); $("html, body").animate({ scrollTop: $("#scanResult").offset().top }, 1000); @@ -210,10 +211,11 @@ define(["jquery"], } rspamd.destroyTable("scan"); rspamd.symbols.scan.length = 0; + $("#cleanScanHistory").attr("disabled", true); }); function enable_disable_scan_btn() { - $("#scan button:not(#scanOptionsToggle)").prop("disabled", ($.trim($("textarea").val()).length === 0)); + $("#scan button:not(#cleanScanHistory, #scanOptionsToggle)").prop("disabled", ($.trim($("textarea").val()).length === 0)); } enable_disable_scan_btn(); $("textarea").on("input", function () { @@ -221,7 +223,7 @@ define(["jquery"], }); $("#scanClean").on("click", function () { - $("#scan button:not(#scanOptionsToggle)").attr("disabled", true); + $("#scan button:not(#cleanScanHistory, #scanOptionsToggle)").attr("disabled", true); $("#scanForm")[0].reset(); $("#scanResult").hide(); $("#scanOutput tbody").remove(); |