summaryrefslogtreecommitdiff
path: root/searx/static/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'searx/static/plugins')
-rw-r--r--searx/static/plugins/js/search_on_category_select.js9
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();
+ }
+ });
}
});