summaryrefslogtreecommitdiff
path: root/elm/UList/labelfilters.js
blob: 6a91a82d0e47cde43440c4d4997d7f653443884e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
var p = document.querySelectorAll('.labelfilters')[0];
if(p) {
    var multi = document.getElementById('form_l_multi');
    var l = document.querySelectorAll('.labelfilters input[name=l]');
    l.forEach(function(el) {
        el.addEventListener('click', function() {
            if(multi.checked)
                return true;
            l.forEach(function(el2) { el2.checked = el2 == el });
        });
    });
}