diff options
| author | Adam Tauber <asciimoo@gmail.com> | 2016-07-26 00:06:16 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-07-26 00:06:16 +0200 |
| commit | 7d9c898170df497036b8a7a70a1a5c86c3859670 (patch) | |
| tree | ca1722a5d0d1bc8493e50bd334a07ea50e744e63 /searx/static/plugins | |
| parent | 54d987636e4b03d19a99ad9d143bf63b119af208 (diff) | |
| parent | 90e74fbb288b2f1df0516d877d3bd239c7800412 (diff) | |
Merge pull request #634 from kvch/advanced-search
support time range search
Diffstat (limited to 'searx/static/plugins')
| -rw-r--r-- | searx/static/plugins/js/search_on_category_select.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/searx/static/plugins/js/search_on_category_select.js b/searx/static/plugins/js/search_on_category_select.js index 5ecc2cdb9..19aeef944 100644 --- a/searx/static/plugins/js/search_on_category_select.js +++ b/searx/static/plugins/js/search_on_category_select.js @@ -4,13 +4,16 @@ $(document).ready(function() { $('#categories input[type="checkbox"]').each(function(i, checkbox) { $(checkbox).prop('checked', false); }); - $('#categories label').removeClass('btn-primary').removeClass('active').addClass('btn-default'); - $(this).removeClass('btn-default').addClass('btn-primary').addClass('active'); - $($(this).children()[0]).prop('checked', 'checked'); + $(document.getElementById($(this).attr("for"))).prop('checked', true); if($('#q').val()) { $('#search_form').submit(); } return false; }); + $('#time-range > option').click(function(e) { + if($('#q').val()) { + $('#search_form').submit(); + } + }); } }); |