Browse Source

follow up changes in search_category_on_select

Noemi Vanyi 9 years ago
parent
commit
074521fd8a
1 changed files with 1 additions and 3 deletions
  1. 1 3
      searx/static/plugins/js/search_on_category_select.js

+ 1 - 3
searx/static/plugins/js/search_on_category_select.js

@@ -4,9 +4,7 @@ $(document).ready(function() {
             $('#categories input[type="checkbox"]').each(function(i, checkbox) {
             $('#categories input[type="checkbox"]').each(function(i, checkbox) {
                 $(checkbox).prop('checked', false);
                 $(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()) {
             if($('#q').val()) {
                 $('#search_form').submit();
                 $('#search_form').submit();
             }
             }