|
257 | 257 | $(document).on('change', '.fsTests-checkbox', function() { |
258 | 258 | const totalFsTests = $('.fsTests-checkbox').length; |
259 | 259 | const checkedFsTests = $('.fsTests-checkbox:checked').length; |
260 | | - $('#fsTests-group').prop('checked', checkedFsTests === totalFsTests); |
| 260 | + |
| 261 | + if (checkedFsTests === 0) { |
| 262 | + $('#fsTests-group').prop('checked', false).prop('indeterminate', false); |
| 263 | + } else if (checkedFsTests === totalFsTests) { |
| 264 | + $('#fsTests-group').prop('checked', true).prop('indeterminate', false); |
| 265 | + } else { |
| 266 | + $('#fsTests-group').prop('checked', false).prop('indeterminate', true); |
| 267 | + } |
261 | 268 | }); |
262 | 269 |
|
263 | 270 | $(document).on('change', '.kvTests-checkbox', function() { |
264 | 271 | const totalKvTests = $('.kvTests-checkbox').length; |
265 | 272 | const checkedKvTests = $('.kvTests-checkbox:checked').length; |
266 | | - $('#kvTests-group').prop('checked', checkedKvTests === totalKvTests); |
| 273 | + |
| 274 | + if (checkedKvTests === 0) { |
| 275 | + $('#kvTests-group').prop('checked', false).prop('indeterminate', false); |
| 276 | + } else if (checkedKvTests === totalKvTests) { |
| 277 | + $('#kvTests-group').prop('checked', true).prop('indeterminate', false); |
| 278 | + } else { |
| 279 | + $('#kvTests-group').prop('checked', false).prop('indeterminate', true); |
| 280 | + } |
267 | 281 | }); |
268 | 282 |
|
269 | 283 | $(document).on('change', '.aiTests-checkbox', function() { |
270 | 284 | const totalAiTests = $('.aiTests-checkbox').length; |
271 | 285 | const checkedAiTests = $('.aiTests-checkbox:checked').length; |
272 | | - $('#aiTests-group').prop('checked', checkedAiTests === totalAiTests); |
| 286 | + |
| 287 | + if (checkedAiTests === 0) { |
| 288 | + $('#aiTests-group').prop('checked', false).prop('indeterminate', false); |
| 289 | + } else if (checkedAiTests === totalAiTests) { |
| 290 | + $('#aiTests-group').prop('checked', true).prop('indeterminate', false); |
| 291 | + } else { |
| 292 | + $('#aiTests-group').prop('checked', false).prop('indeterminate', true); |
| 293 | + } |
273 | 294 | }); |
274 | 295 |
|
275 | 296 | window.assert = function(condition, message) { |
|
0 commit comments