server/apps/files/js/admin.js

24 lines
756 B
JavaScript
Raw Normal View History

function switchPublicFolder()
2011-07-09 19:44:50 +00:00
{
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
});
2011-07-09 19:44:50 +00:00
}
$(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');
}
});
2011-07-09 19:44:50 +00:00
});