From 074521fd8a2893c723a69941f400a0e9f4002559 Mon Sep 17 00:00:00 2001 From: Noemi Vanyi Date: Sun, 17 Jul 2016 19:03:42 +0200 Subject: follow up changes in search_category_on_select --- searx/static/plugins/js/search_on_category_select.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'searx/static/plugins') diff --git a/searx/static/plugins/js/search_on_category_select.js b/searx/static/plugins/js/search_on_category_select.js index 5ecc2cdb9..a6dd447a0 100644 --- a/searx/static/plugins/js/search_on_category_select.js +++ b/searx/static/plugins/js/search_on_category_select.js @@ -4,9 +4,7 @@ $(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(); } -- cgit v1.2.3 From 90e74fbb288b2f1df0516d877d3bd239c7800412 Mon Sep 17 00:00:00 2001 From: Noemi Vanyi Date: Mon, 25 Jul 2016 23:40:31 +0200 Subject: search on filter select --- searx/static/plugins/js/search_on_category_select.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'searx/static/plugins') diff --git a/searx/static/plugins/js/search_on_category_select.js b/searx/static/plugins/js/search_on_category_select.js index a6dd447a0..19aeef944 100644 --- a/searx/static/plugins/js/search_on_category_select.js +++ b/searx/static/plugins/js/search_on_category_select.js @@ -10,5 +10,10 @@ $(document).ready(function() { } return false; }); + $('#time-range > option').click(function(e) { + if($('#q').val()) { + $('#search_form').submit(); + } + }); } }); -- cgit v1.2.3