From 4e5af8d87bc3602fcdb263ad2e1595be91df95c9 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Wed, 10 Feb 2016 18:06:11 +0100 Subject: [mod] move plugin static files to static/plugins --- 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(-) delete mode 100644 searx/static/js/search_on_category_select.js create mode 100644 searx/static/plugins/js/search_on_category_select.js (limited to 'searx') diff --git a/searx/plugins/search_on_category_select.py b/searx/plugins/search_on_category_select.py index a1667021d..53585faea 100644 --- 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 deleted file mode 100644 index 5ecc2cdb9..000000000 --- a/searx/static/js/search_on_category_select.js +++ /dev/null @@ -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 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; + }); + } +}); -- cgit v1.2.3-54-g00ecf