diff options
author | Adam Tauber <asciimoo@gmail.com> | 2016-02-10 18:06:11 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2016-02-10 18:06:11 +0100 |
commit | 4e5af8d87bc3602fcdb263ad2e1595be91df95c9 (patch) | |
tree | 9d411ff4657360106662dd999dccda5e504a9307 /searx/static/plugins | |
parent | ab6a7601cbdbdd93fa07ec6405bc3167f392b792 (diff) | |
download | searxng-4e5af8d87bc3602fcdb263ad2e1595be91df95c9.tar.gz searxng-4e5af8d87bc3602fcdb263ad2e1595be91df95c9.zip |
[mod] move plugin static files to static/plugins
Diffstat (limited to 'searx/static/plugins')
-rw-r--r-- | searx/static/plugins/js/search_on_category_select.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/searx/static/plugins/js/search_on_category_select.js b/searx/static/plugins/js/search_on_category_select.js new file mode 100644 index 000000000..5ecc2cdb9 --- /dev/null +++ b/searx/static/plugins/js/search_on_category_select.js @@ -0,0 +1,16 @@ +$(document).ready(function() { + if($('#q').length) { + $('#categories label').click(function(e) { + $('#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'); + if($('#q').val()) { + $('#search_form').submit(); + } + return false; + }); + } +}); |