first commit - report data

This commit is contained in:
2025-03-21 10:22:45 +07:00
commit 59963790c0
3493 changed files with 1353173 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
"use strict";
$("[data-checkboxes]").each(function() {
var me = $(this),
group = me.data('checkboxes'),
role = me.data('checkbox-role');
me.change(function() {
var all = $('[data-checkboxes="' + group + '"]:not([data-checkbox-role="dad"])'),
checked = $('[data-checkboxes="' + group + '"]:not([data-checkbox-role="dad"]):checked'),
dad = $('[data-checkboxes="' + group + '"][data-checkbox-role="dad"]'),
total = all.length,
checked_length = checked.length;
if(role == 'dad') {
if(me.is(':checked')) {
all.prop('checked', true);
}else{
all.prop('checked', false);
}
}else{
if(checked_length >= total) {
dad.prop('checked', true);
}else{
dad.prop('checked', false);
}
}
});
});