Преглед на файлове

change sorting of rspamd symbols in quarantine

friedPotat0 преди 6 години
родител
ревизия
d2d520336b
променени са 1 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 6 0
      data/web/js/site/quarantine.js

+ 6 - 0
data/web/js/site/quarantine.js

@@ -98,6 +98,12 @@ jQuery(function($){
           data.symbols.sort(function (a, b) {
             if (a.score === 0) return 1
             if (b.score === 0) return -1
+            if (b.score < 0 && a.score < 0) {
+              return a.score - b.score
+            }
+            if (b.score > 0 && a.score > 0) {
+              return b.score - a.score
+            }
             return b.score - a.score
           })
           $.each(data.symbols, function (index, value) {