You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admin.js 923B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (c) 2014
  3. *
  4. * This file is licensed under the Affero General Public License version 3
  5. * or later.
  6. *
  7. * See the COPYING-README file.
  8. *
  9. */
  10. function switchPublicFolder() {
  11. var publicEnable = $('#publicEnable').is(':checked');
  12. // find all radiobuttons of that group
  13. var sharingaimGroup = $('input:radio[name=sharingaim]');
  14. $.each(sharingaimGroup, function(index, sharingaimItem) {
  15. // set all buttons to the correct state
  16. sharingaimItem.disabled = !publicEnable;
  17. });
  18. }
  19. $(document).ready(function() {
  20. // Execute the function after loading DOM tree
  21. switchPublicFolder();
  22. $('#publicEnable').click(function() {
  23. // To get rid of onClick()
  24. switchPublicFolder();
  25. });
  26. $('#allowZipDownload').bind('change', function() {
  27. if($('#allowZipDownload').attr('checked')) {
  28. $('#maxZipInputSize').removeAttr('disabled');
  29. } else {
  30. $('#maxZipInputSize').attr('disabled', 'disabled');
  31. }
  32. });
  33. });