PageSourceSearch

https://www.agires.com/wp-content/themes/agires/js/schools-list-filters.js?ver=20210210

js agires.com collected 2026-10-02 20:51:37 UTC 1,955 bytes, 65 lines download raw bytes

1/**
2 * Schools list filters
3 */
4
5( function( $ ) {
6
7  addShowClassSecondary = function(){
8    $('.one-school[data-secondary="true"]').addClass('secondary-visible');
9  }
10  removeShowClassSecondary = function(){
11    $('.one-school[data-secondary="true"]').removeClass('secondary-visible');
12  }
13
14  // Toutes les écoles ou seulement les bénéficiaires du solde 13% TA (radios boutons)
15  if(document.getElementById('list_filters')){
16    // 1 - radios all vs 13%
17    var rad = document.list_filters.filter_all_or_ta;
18    var prev = null;
19    for (var i = 0; i < rad.length; i++) {
20      rad[i].addEventListener('change', function() {
21        if (this !== prev) {
22          prev = this;
23        }
24        if(this.value == "ta") {
25          $('.schools-list').attr('data-show-ta-only', 'true');
26        }
27        if(this.value == "all") {
28          $('.schools-list').attr('data-show-ta-only', 'false');
29        }
30      });
31    }
32    // 2 - Secondary sites checkbox
33    var secondary_checkbox = document.list_filters.filter_secondary;
34    secondary_checkbox.addEventListener('change', (event) => {
35      if (event.currentTarget.checked){
36        // alert('checked');
37        addShowClassSecondary();
38      }else{
39        //alert('not checked');
40        removeShowClassSecondary();
41      }
42    })
43  }
44
45  // Filtres par domaines (select)
46  $('#filter_by_domain').change(function(){
47    //console.log($(this).val());
48    if ($(this).val() == "TOUT"){
49      $('.schools-list').attr('data-show-domain', '');
50    }
51    else{
52      $('.schools-list').attr('data-show-domain', $(this).val());
53    }
54  })
55  // Filtres par region (select)
56  $('#filter_by_area').change(function(){
57    console.log($(this).val());
58    if ($(this).val() == "TOUTES"){
59      $('.schools-list').attr('data-show-area', '');
60    }
61    else{
62      $('.schools-list').attr('data-show-area', $(this).val());
63    }
64  })
65} )( jQuery );

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.