From 45de7ad221f9e505abdabcc5084dd12c80851469 Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Wed, 18 Apr 2012 17:27:34 +0200 Subject: move files to app folder --- apps/files/js/admin.js | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 apps/files/js/admin.js (limited to 'apps/files/js/admin.js') diff --git a/apps/files/js/admin.js b/apps/files/js/admin.js new file mode 100644 index 00000000000..bfa96670635 --- /dev/null +++ b/apps/files/js/admin.js @@ -0,0 +1,23 @@ +function switchPublicFolder() +{ + var publicEnable = $('#publicEnable').is(':checked'); + var sharingaimGroup = $('input:radio[name=sharingaim]'); //find all radiobuttons of that group + $.each(sharingaimGroup, function(index, sharingaimItem) { + sharingaimItem.disabled = !publicEnable; //set all buttons to the correct state + }); +} + +$(document).ready(function(){ + switchPublicFolder(); // Execute the function after loading DOM tree + $('#publicEnable').click(function(){ + switchPublicFolder(); // To get rid of onClick() + }); + + $('#allowZipDownload').bind('change', function() { + if($('#allowZipDownload').attr('checked')) { + $('#maxZipInputSize').removeAttr('disabled'); + } else { + $('#maxZipInputSize').attr('disabled', 'disabled'); + } + }); +}); -- cgit v1.2.3