diff options
Diffstat (limited to 'files/js/admin.js')
-rw-r--r-- | files/js/admin.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/files/js/admin.js b/files/js/admin.js new file mode 100644 index 00000000000..5cbb2b9f5ac --- /dev/null +++ b/files/js/admin.js @@ -0,0 +1,15 @@ +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() + }); +}); |