From: moisseev Date: Sun, 3 Dec 2023 16:59:17 +0000 (+0300) Subject: [WebUI] Update symbols score background on input X-Git-Tag: 3.8.0~48^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F4723%2Fhead;p=rspamd.git [WebUI] Update symbols score background on input --- diff --git a/interface/js/app/symbols.js b/interface/js/app/symbols.js index fdc31f3e6..3db704562 100644 --- a/interface/js/app/symbols.js +++ b/interface/js/app/symbols.js @@ -75,7 +75,7 @@ define(["jquery", "app/rspamd", "footable"], } else if (item.weight > 0) { label_class = "scorebar-spam"; } - item.weight = ''; if (!item.time) { @@ -232,6 +232,15 @@ define(["jquery", "app/rspamd", "footable"], const value = $(this).data("save"); if (!value) return; saveSymbols("./savesymbols", "symbolsTable", value); + }) + .on("input", ".scorebar", ({target}) => { + const t = $(target); + t.removeClass("scorebar-ham scorebar-spam"); + if (target.value < 0) { + t.addClass("scorebar-ham"); + } else if (target.value > 0) { + t.addClass("scorebar-spam"); + } }); };