summaryrefslogtreecommitdiffstats
path: root/files/js/admin.js
diff options
context:
space:
mode:
authorHans Bakker <hansmbakker@gmail.com>2011-07-09 21:44:50 +0200
committerHans Bakker <hansmbakker@gmail.com>2011-07-09 21:44:50 +0200
commit5c671c995cfb68866608e95b28e5be49087eb910 (patch)
tree7af9ffb3aa51200eda29dc383b0ae351a48cf6d7 /files/js/admin.js
parent541c40f3cc9389523088c6b05aa96448b6473827 (diff)
downloadnextcloud-server-5c671c995cfb68866608e95b28e5be49087eb910.tar.gz
nextcloud-server-5c671c995cfb68866608e95b28e5be49087eb910.zip
finish refactoring of files admin page
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()
+ });
+});