diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-01 11:59:13 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-11-01 11:59:13 +0000 |
commit | 7c95fa79e671eb9051e692ef6d7bccfd76cbcfd3 (patch) | |
tree | 59e50bc6754f2ed8b5e91a3b987b6a758a767dd1 /interface | |
parent | 84500eb92ab38f3cbf75a3d7d97570180d8162c7 (diff) | |
download | rspamd-7c95fa79e671eb9051e692ef6d7bccfd76cbcfd3.tar.gz rspamd-7c95fa79e671eb9051e692ef6d7bccfd76cbcfd3.zip |
[WebUI] More fixes to symbols config
Diffstat (limited to 'interface')
-rw-r--r-- | interface/index.html | 14 | ||||
-rw-r--r-- | interface/js/rspamd.js | 31 |
2 files changed, 15 insertions, 30 deletions
diff --git a/interface/index.html b/interface/index.html index 98b6557c5..f93adabd2 100644 --- a/interface/index.html +++ b/interface/index.html @@ -149,13 +149,13 @@ <div class="widget-content nopadding"> <table class="table table-log table-hover" id="symbolsTable"> <thead> - <th class="col1" title="Symbol">Symbol name</th> - <th class="col2" title="Group">Group</th> - <th class="col2" title="Description">Description</th> - <th class="col3" title="Score">Score</th> - <th class="col4" title="Hits">Hits</th> - <th class="col5" title="Avg.time">Avg.time</th> - <th class="col6" title="Save data">Save data</th> + <th title="Symbol">Symbol name</th> + <th title="Group">Group</th> + <th title="Description">Description</th> + <th title="Score">Score</th> + <th title="Hits">Hits</th> + <th title="Avg.time">Avg.time</th> + <th title="Save data">Save data</th> </thead> </table> </div> diff --git a/interface/js/rspamd.js b/interface/js/rspamd.js index 15aa47b7c..96add8257 100644 --- a/interface/js/rspamd.js +++ b/interface/js/rspamd.js @@ -654,15 +654,7 @@ } // @get symbols into modal form function getSymbols() { - var symbols_length = 50; - if (symbols) { - var sl = document.getElementsByName('symbols_length')[0]; - if (sl !== undefined) { - symbols_length = parseInt(sl.value); - } else { - symbols_length = 50; - } symbols.destroy(); symbols = null; $('#symbolsTable').children('tbody').remove(); @@ -701,7 +693,7 @@ item.frequency = 0; } items.push('<tr>' + - '<td data-order="' + item.symbol + '">' + item.symbol + '</td>' + + '<td data-order="' + item.symbol + '"><strong>' + item.symbol + '</strong></td>' + '<td data-order="' + group.group + '"><div class="cell-overflow" tabindex="1" title="' + group.group + '">' + group.group + '</div></td>' + '<td data-order="' + item.description + '"><div class="cell-overflow" tabindex="1" title="' + item.description + '">' + item.description + '</div></td>' + '<td data-order="' + item.weight + '"><input class="numeric" data-role="numerictextbox" autocomplete="off" "type="number" class="input" min="' + @@ -720,34 +712,27 @@ html: items.join('') }).insertAfter('#symbolsTable thead'); symbols = $('#symbolsTable').DataTable({ - "aLengthMenu": [ - [50, 100, 200, -1], - [50, 100, 200, "All"] - ], + "paging": false, "orderMulti": true, "order": [ [1, "asc"], [0, "asc"], [3, "desc"] ], - "pageLength": symbols_length, + "info": false, "columns": [ - {"width": "30%", "searchable": true, "orderable": true}, + {"width": "25%", "searchable": true, "orderable": true}, {"width": "10%", "searchable": true, "orderable": true}, - {"width": "30%", "searchable": false, "orderable": false}, - {"searchable": false, "orderable": true, "type": "num"}, + {"width": "25%", "searchable": false, "orderable": false}, + {"width": "10%", "searchable": false, "orderable": true, "type": "num"}, {"searchable": false, "orderable": true, "type": "num"}, {"searchable": false, "orderable": true, "type": "num"}, - {"width": "10%", "searchable": false, "orderable": false, "type": "html"} - ] + {"width": "5%", "searchable": false, "orderable": false, "type": "html"} + ], }); symbols.columns.adjust().draw(); $('#symbolsTable :button').on('click', function(){saveSymbols("/savesymbols", "symbolsTable")}); - $('#symbolsTable').on( 'page.dt', function () { - $('#symbolsTable :button').on('click', - function(){saveSymbols("/savesymbols", "symbolsTable")}); - }); }, error: function (data) { alertMessage('alert-modal alert-error', data.statusText); |