summaryrefslogtreecommitdiffstats
path: root/files/js/admin.js
blob: 5cbb2b9f5ac5aa163ff3bad64eb3629ecd177574 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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()
       });
});