logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: 4e5af8d87bc3602fcdb263ad2e1595be91df95c9
parent: ab6a7601cbdbdd93fa07ec6405bc3167f392b792
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Wed, 10 Feb 2016 18:06:11 +0100

[mod] move plugin static files to static/plugins

Diffstat:

searx/plugins/search_on_category_select.py | 2+-
searx/static/js/search_on_category_select.js | 16----------------
searx/static/plugins/js/search_on_category_select.js | 16++++++++++++++++
3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/searx/plugins/search_on_category_select.py b/searx/plugins/search_on_category_select.py @@ -20,4 +20,4 @@ description = gettext('Perform search immediately if a category selected. ' 'Disable to select multiple categories. (JavaScript required)') default_on = True -js_dependencies = ('js/search_on_category_select.js',) +js_dependencies = ('plugins/js/search_on_category_select.js',) diff --git a/searx/static/js/search_on_category_select.js b/searx/static/js/search_on_category_select.js @@ -1,16 +0,0 @@ -$(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; - }); - } -}); diff --git a/searx/static/plugins/js/search_on_category_select.js 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; + }); + } +});