diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-04-18 12:49:52 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-04-18 13:16:49 +0200 |
commit | 5896fbd91005cd523bbcbae8a65eb7ce159edc95 (patch) | |
tree | 0042110d5d5732a33b9224ad3b2cdaf32a2ea75a | |
parent | f1e78be4f42a24778ebbd56c6438d8b5f5f411b3 (diff) | |
download | nextcloud-server-5896fbd91005cd523bbcbae8a65eb7ce159edc95.tar.gz nextcloud-server-5896fbd91005cd523bbcbae8a65eb7ce159edc95.zip |
make state of select all checkbox consistent
-rw-r--r-- | files/js/files.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/files/js/files.js b/files/js/files.js index 6dc1f639e83..906f33a9dd9 100644 --- a/files/js/files.js +++ b/files/js/files.js @@ -39,6 +39,16 @@ $(document).ready(function() { $('td.selection input:checkbox').attr('checked', false); }); + $('td.selection input:checkbox').click(function() { + if(!$(this).attr('checked')){ + $('#select_all').attr('checked',false); + }else{ + if($('td.selection input:checkbox:checked').length==$('td.selection input:checkbox').length){ + $('#select_all').attr('checked',true); + } + } + }); + // Delete current file $('#delete_single_file').click(function() { filename = $('#file_menu').parents('tr:first').find('.filename:first').children('a:first').text(); |