aboutsummaryrefslogtreecommitdiffstats
path: root/files/js/admin.js
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-07-10 16:00:31 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-07-10 16:00:31 -0400
commit89a6f16e8d03af8e9527ead0b17db119344c83d4 (patch)
treeec3151561bb83655ed17789061dec88d8722732d /files/js/admin.js
parent1b8e59a0effc5d11347f6c248de8b17bbe7f8321 (diff)
parent5c671c995cfb68866608e95b28e5be49087eb910 (diff)
downloadnextcloud-server-89a6f16e8d03af8e9527ead0b17db119344c83d4.tar.gz
nextcloud-server-89a6f16e8d03af8e9527ead0b17db119344c83d4.zip
Merge branch 'master' of git://anongit.kde.org/owncloud
Diffstat (limited to 'files/js/admin.js')
-rw-r--r--files/js/admin.js15
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()
+ });
+});