Files
TDI-Dashboard/static/js/email.js
T
2026-05-08 10:32:12 +02:00

17 lines
618 B
JavaScript

(function(){
function applyFilter() {
var active = {};
document.querySelectorAll('.email-filter input[type="checkbox"]').forEach(function(chk) {
active[chk.getAttribute('data-stato')] = chk.checked;
});
document.querySelectorAll('tbody tr[data-stato]').forEach(function(tr) {
var stato = tr.getAttribute('data-stato');
var show = (stato in active) ? active[stato] : true;
tr.style.display = show ? '' : 'none';
});
}
document.querySelectorAll('.email-filter input[type="checkbox"]').forEach(function(chk) {
chk.addEventListener('change', applyFilter);
});
})();