From da534790069b2257cd91ef539e26f72427ca628d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 23 Mar 2016 10:16:55 +0000 Subject: [PATCH] [Feature] Sort symbols in webui --- interface/js/rspamd.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interface/js/rspamd.js b/interface/js/rspamd.js index 0f01dccd9..3d6484cd8 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; -- 2.39.5