From: Vsevolod Stakhov Date: Wed, 23 Mar 2016 10:16:55 +0000 (+0000) Subject: [Feature] Sort symbols in webui X-Git-Tag: 1.2.1~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da534790069b2257cd91ef539e26f72427ca628d;p=thirdparty%2Frspamd.git [Feature] Sort symbols in webui --- diff --git a/interface/js/rspamd.js b/interface/js/rspamd.js index 0f01dccd9f..3d6484cd82 100644 --- a/interface/js/rspamd.js +++ b/interface/js/rspamd.js @@ -554,10 +554,16 @@ }, success: function (data) { $('#modalBody').empty(); + data.sort(function(a, b) { + return a.group.localeCompare(b.group); + }); $.each(data, function (i, group) { items.push('
' + '

' + group.group + '

' + '
'); + group.rules.sort(function(a, b) { + return a.symbol.localeCompare(b.symbol); + }); $.each(group.rules, function (i, item) { var max = 20; var min = -20;