diff options
author | Simon Rettberg | 2016-07-29 12:18:36 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-07-29 12:18:36 +0200 |
commit | 6abbd2bf9a0dafa93e92928a269820eaa127b12b (patch) | |
tree | d44eb55035a84f73e1795d93e2f26be6ddada0df /modules-available/statistics/templates/filterbox.html | |
parent | [baseconfig] Rework makeInput to prevent generating invalid tag attribs (diff) | |
download | slx-admin-6abbd2bf9a0dafa93e92928a269820eaa127b12b.tar.gz slx-admin-6abbd2bf9a0dafa93e92928a269820eaa127b12b.tar.xz slx-admin-6abbd2bf9a0dafa93e92928a269820eaa127b12b.zip |
[statistics] Make filtering more dynamic, remove hard cutoff from summary
Diffstat (limited to 'modules-available/statistics/templates/filterbox.html')
-rw-r--r-- | modules-available/statistics/templates/filterbox.html | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/modules-available/statistics/templates/filterbox.html b/modules-available/statistics/templates/filterbox.html index 2e7928e9..a8a36adb 100644 --- a/modules-available/statistics/templates/filterbox.html +++ b/modules-available/statistics/templates/filterbox.html @@ -99,7 +99,8 @@ document.addEventListener("DOMContentLoaded", function () { /* initialize selectize */ filterSelectize = $('#filterInput').selectize({ delimiter: slxFilterDel, - plugins: ['restore_on_backspace', 'remove_button'], + persist: false, + plugins: ['remove_button'], create: function(input) { return {value: input, text: input} }, @@ -156,6 +157,22 @@ document.addEventListener("DOMContentLoaded", function () { initButtons(); + $('.filter-col').each(function(idx, elem) { + var e = $(elem); + var col = e.data('filter-col'); + if (!col) return; + e.find('.filter-val').each(function(idx, elem) { + var e = $(elem); + var val = e.data('filter-val'); + if (!val) return; + e.click(function(ev) { + ev.preventDefault(); + addFilter(col, '=', val); + refresh(); + }); + }); + }); + }, false); |