aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--interface/index.html2
-rw-r--r--interface/js/app/upload.js6
2 files changed, 5 insertions, 3 deletions
diff --git a/interface/index.html b/interface/index.html
index 61ecc5b2e..2fad32b2f 100644
--- a/interface/index.html
+++ b/interface/index.html
@@ -493,7 +493,7 @@
</select>
<label for="scan_page_size" class="ms-2">Rows per page:</label>
<input id="scan_page_size" class="form-control ms-1" value="25" min="1" type="number">
- <button class="btn btn-secondary btn-sm ms-2" id="cleanScanHistory">
+ <button class="btn btn-secondary btn-sm ms-2" id="cleanScanHistory" disabled>
<i class="fas fa-trash-alt"></i> Clean history
</button>
</div>
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();