PageSourceSearch

https://www.bard.fr/assets/controllers/droit_controller-a27267e3c342ea465c4ebd0300c8c07d.js

js bard.fr collected 2026-10-02 20:30:06 UTC 1,162 bytes, 46 lines download raw bytes

1import {Controller} from '@hotwired/stimulus';
2
3/* stimulusFetch: 'lazy' */
4export default class extends Controller {
5    static targets = [
6        "signalement",
7        "toutes",
8        "signalementCategorie",
9        "droitHide"
10    ];
11
12    connect() {
13        this.afficheCategories();
14    }
15
16    afficheCategories() {
17        if (this.signalementTarget.checked) {
18            this.droitHideTarget.classList.remove('d-none');
19        } else {
20            this.droitHideTarget.classList.add('d-none');
21            this.resetCategories();
22        }
23    }
24
25    allCategoryChecked() {
26        return this.signalementCategorieTargets.every(categorie => categorie.checked);
27    }
28
29    activeCategories() {
30        let checkAll = this.toutesTarget.checked;
31        this.signalementCategorieTargets.forEach(categorie => {
32            categorie.checked = checkAll;
33        });
34    }
35
36    activeToutes() {
37        this.toutesTarget.checked = this.allCategoryChecked();
38    }
39
40    resetCategories() {
41        this.toutesTarget.checked = false;
42        this.signalementCategorieTargets.forEach(categorie => {
43            categorie.checked = false;
44        });
45    }
46}

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.