diff options
author | Alexander Moisseev <moiseev@mezonplus.ru> | 2019-03-31 18:14:53 +0300 |
---|---|---|
committer | Alexander Moisseev <moiseev@mezonplus.ru> | 2019-03-31 18:14:53 +0300 |
commit | 4d8460517ab46f1967f0397fa557017d049760c7 (patch) | |
tree | 8eb92fe81d53773206a265e183e71a745b2ec981 /interface/js/app/upload.js | |
parent | 12367efb629e74e792d4930d802e6178c4126a9b (diff) | |
download | rspamd-4d8460517ab46f1967f0397fa557017d049760c7.tar.gz rspamd-4d8460517ab46f1967f0397fa557017d049760c7.zip |
[WebUI] Combine Scan and Learning into one tab
Closes: #1441
Diffstat (limited to 'interface/js/app/upload.js')
-rw-r--r-- | interface/js/app/upload.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/interface/js/app/upload.js b/interface/js/app/upload.js index d5d0768f1..2837ff666 100644 --- a/interface/js/app/upload.js +++ b/interface/js/app/upload.js @@ -150,14 +150,15 @@ define(["jquery"], return e.options[e.selectedIndex].value; } + $("#scan button").attr("disabled", true); $("textarea").keyup(function () { var $this = $(this); - $this.closest("form").find("button") + $("#scan button") .prop("disabled", ($.trim($this.val()).length === 0)); }); - $("#scanClean").on("click", function () { - $("#scanTextSource").val(""); + $("#scan button").attr("disabled", true); + $("#scanMsgSource").val(""); $("#scanResult").hide(); $("#scanOutput tbody").remove(); $("html, body").animate({scrollTop:0}, 1000); @@ -166,7 +167,7 @@ define(["jquery"], // @init upload $("[data-upload]").on("click", function () { var source = $(this).data("upload"); - var data = $("#" + source + "TextSource").val(); + var data = $("#scanMsgSource").val(); var headers = (source === "fuzzy") ? { flag: $("#fuzzyFlagText").val(), |