|
9 | 9 | body { |
10 | 10 | font-family: Arial, sans-serif; |
11 | 11 | } |
| 12 | + nav { |
| 13 | + z-index: 1000; |
| 14 | + display: flex; |
| 15 | + align-items: center; |
| 16 | + position: fixed; |
| 17 | + top: 0; |
| 18 | + width: 100%; |
| 19 | + background: #EEE; |
| 20 | + left: 0; |
| 21 | + padding-left: 10px; |
| 22 | + } |
12 | 23 | #tests { |
13 | | - margin-top: 20px; |
| 24 | + padding-top: 50px; |
14 | 25 | } |
15 | 26 | #run-tests { |
16 | 27 | margin-top: 20px; |
|
380 | 391 | const isChecked = $(this).prop('checked'); |
381 | 392 | $('.test-checkbox').prop('checked', isChecked); |
382 | 393 | $('#fsTests-group, #kvTests-group, #aiTests-group').prop('checked', isChecked); |
| 394 | + // Update the counter display |
| 395 | + updateMasterCheckboxState(); |
383 | 396 | }); |
384 | 397 |
|
385 | 398 | // Function to update master checkbox state |
386 | 399 | function updateMasterCheckboxState() { |
387 | 400 | const totalCheckboxes = $('.test-checkbox').length; |
388 | 401 | const checkedCheckboxes = $('.test-checkbox:checked').length; |
389 | 402 |
|
| 403 | + // Update the counter display |
| 404 | + $('#test-counter').text(`${checkedCheckboxes} / ${totalCheckboxes}`); |
| 405 | + |
390 | 406 | if (checkedCheckboxes === 0) { |
391 | 407 | $('#master-checkbox').prop('checked', false).prop('indeterminate', false); |
392 | 408 | } else if (checkedCheckboxes === totalCheckboxes) { |
|
406 | 422 | updateMasterCheckboxState(); |
407 | 423 | }); |
408 | 424 |
|
| 425 | + // Initialize the counter display |
| 426 | + updateMasterCheckboxState(); |
| 427 | + |
409 | 428 | }); |
410 | 429 |
|
411 | 430 | </script> |
412 | 431 | </head> |
413 | 432 | <body> |
414 | 433 |
|
415 | | - <nav style="position: fixed; top: 0; width: 100%; background: #EEE; left: 0; padding-left: 10px;"> |
| 434 | + <nav> |
416 | 435 | <label style="margin-left: 8px; margin-right: 10px; cursor: pointer; display: inline-flex; align-items: center;"> |
417 | 436 | <input type="checkbox" id="master-checkbox" checked style="margin-right: 5px; transform: scale(1.2);"> |
418 | 437 | </label> |
419 | | - <button id="run-tests">Run Tests</button> |
| 438 | + <span id="test-counter" style="font-size: 14px; color: #666; margin-right: 10px;"></span> |
| 439 | + <div style="flex: 1; text-align: right;"> |
| 440 | + <button id="run-tests" style="margin-right: 30px;">Run Tests</button> |
| 441 | + </div> |
420 | 442 | </nav> |
421 | 443 | <div id="tests"></div> |
422 | 444 | </body> |
|
0 commit comments