mirror of
https://github.com/searxng/searxng.git
synced 2025-12-23 04:00:02 +00:00
[mod] move plugin static files to static/plugins
This commit is contained in:
16
searx/static/plugins/js/search_on_category_select.js
Normal file
16
searx/static/plugins/js/search_on_category_select.js
Normal file
@@ -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;
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user