admin.js 756 B

123456789101112131415161718192021222324
  1. function switchPublicFolder()
  2. {
  3. var publicEnable = $('#publicEnable').is(':checked');
  4. var sharingaimGroup = $('input:radio[name=sharingaim]'); //find all radiobuttons of that group
  5. $.each(sharingaimGroup, function(index, sharingaimItem) {
  6. sharingaimItem.disabled = !publicEnable; //set all buttons to the correct state
  7. });
  8. }
  9. $(document).ready(function(){
  10. switchPublicFolder(); // Execute the function after loading DOM tree
  11. $('#publicEnable').click(function(){
  12. switchPublicFolder(); // To get rid of onClick()
  13. });
  14. $('#allowZipDownload').bind('change', function() {
  15. if($('#allowZipDownload').attr('checked')) {
  16. $('#maxZipInputSize').removeAttr('disabled');
  17. } else {
  18. $('#maxZipInputSize').attr('disabled', 'disabled');
  19. }
  20. });
  21. });