diff options
Diffstat (limited to 'A8_srv_build')
-rw-r--r-- | A8_srv_build/list.php | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/A8_srv_build/list.php b/A8_srv_build/list.php index 4714382..c5c3b47 100644 --- a/A8_srv_build/list.php +++ b/A8_srv_build/list.php @@ -239,15 +239,22 @@ if ($stmt->rowCount() > 0) { <!-- end w3c tag --> <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script type='text/javascript'> -$('#submit').prop("disabled", true); -$('input:checkbox').click(function() { - if ($(this).is(':checked')) { - $('#submit').prop("disabled", false); - } else { - if ($('.checks').filter(':checked').length < 1){ - $('#submit').attr('disabled',true);} - } +var checkBoxes = $('tbody .checks'); +checkBoxes.change(function() { + $('#submit').prop('disabled', checkBoxes.filter(':checked').length < 1); }); -i </script> +checkBoxes.change(); + +$("#selectall").click(function () { + $(".checks").prop('checked', $(this).prop('checked')); + $('#submit').prop('disabled', checkBoxes.filter(':checked').length < 1); +}); + +$(".checks").change(function(){ + if (!$(this).prop("checked")){ + $("#selectall").prop("checked",false); + } +}); + </script> </body> </html> |