Browse Source

[Web] Handle score as string

andryyy 6 years ago
parent
commit
45f31ba931
1 changed files with 4 additions and 1 deletions
  1. 4 1
      data/web/js/site/quarantine.js

+ 4 - 1
data/web/js/site/quarantine.js

@@ -17,7 +17,7 @@ jQuery(function($){
         {"name":"sender","title":lang.sender},
         {"name":"rcpt","title":lang.rcpt, "breakpoints":"xs sm md", "type": "text"},
         {"name":"virus","title":lang.danger, "type": "text"},
-        {"name":"score","title": lang.spam_score,"type": "number"},
+        {"name":"score","title": lang.spam_score, "type": "text"},
         {"name":"subject","title":lang.subj, "type": "text"},
         {"name":"created","formatter":function unix_time_format(tm) { var date = new Date(tm ? tm * 1000 : 0); return date.toLocaleString();},"title":lang.received,"style":{"width":"170px"}},
         {"name":"action","filterable": false,"sortable": false,"style":{"text-align":"right"},"style":{"width":"220px"},"type":"html","title":lang.action,"breakpoints":"xs sm md"}
@@ -36,6 +36,9 @@ jQuery(function($){
             } else {
               item.subject = escapeHtml(item.subject);
             }
+            if (item.score === null) {
+              item.score = '-';
+            }
             if (item.virus_flag > 0) {
               item.virus = '<span class="dot-danger"></span>';
             } else {