@osimatic/helpers-js 1.1.11 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/multiple_action_in_table.js +14 -0
- package/package.json +1 -1
|
@@ -57,6 +57,13 @@ class MultipleActionInTable {
|
|
|
57
57
|
let allCheckbox = table.find('input.action_multiple_checkbox');
|
|
58
58
|
let allCheckboxChecked = table.find('input.action_multiple_checkbox:checked');
|
|
59
59
|
let checkboxSelectAll = table.find('thead tr th input.action_multiple_check_all');
|
|
60
|
+
|
|
61
|
+
if (allCheckbox.length === 0) {
|
|
62
|
+
checkboxSelectAll.addClass('hide');
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
checkboxSelectAll.removeClass('hide');
|
|
60
67
|
if (allCheckbox.length === allCheckboxChecked.length) {
|
|
61
68
|
checkboxSelectAll.prop('checked', true);
|
|
62
69
|
}
|
|
@@ -165,6 +172,13 @@ class MultipleActionInDivList {
|
|
|
165
172
|
let allCheckbox = contentDiv.find('input.action_multiple_checkbox');
|
|
166
173
|
let allCheckboxChecked = contentDiv.find('input.action_multiple_checkbox:checked');
|
|
167
174
|
let checkboxSelectAll = contentDiv.find('input.action_multiple_check_all');
|
|
175
|
+
|
|
176
|
+
if (allCheckbox.length === 0) {
|
|
177
|
+
checkboxSelectAll.addClass('hide');
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
checkboxSelectAll.removeClass('hide');
|
|
168
182
|
if (allCheckbox.length === allCheckboxChecked.length) {
|
|
169
183
|
checkboxSelectAll.prop('checked', true);
|
|
170
184
|
}
|