Explorar el Código

follow up changes in search_category_on_select

Noemi Vanyi hace 8 años
padre
commit
074521fd8a
Se han modificado 1 ficheros con 1 adiciones y 3 borrados
  1. 1
    3
      searx/static/plugins/js/search_on_category_select.js

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

@@ -4,9 +4,7 @@ $(document).ready(function() {
4 4
             $('#categories input[type="checkbox"]').each(function(i, checkbox) {
5 5
                 $(checkbox).prop('checked', false);
6 6
             });
7
-            $('#categories label').removeClass('btn-primary').removeClass('active').addClass('btn-default');
8
-            $(this).removeClass('btn-default').addClass('btn-primary').addClass('active');
9
-            $($(this).children()[0]).prop('checked', 'checked');
7
+            $(document.getElementById($(this).attr("for"))).prop('checked', true);
10 8
             if($('#q').val()) {
11 9
                 $('#search_form').submit();
12 10
             }