[Web] Handle score as string

master
andryyy 2019-07-23 19:52:46 +02:00
parent 584fb75f05
commit 45f31ba931
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 4 additions and 1 deletions

View File

@ -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 {