2014-01-30 09:41:04 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2014
|
|
|
|
*
|
|
|
|
* This file is licensed under the Affero General Public License version 3
|
|
|
|
* or later.
|
|
|
|
*
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2012-03-19 10:56:02 +00:00
|
|
|
function switchPublicFolder()
|
2011-07-09 19:44:50 +00:00
|
|
|
{
|
2012-03-19 10:56:02 +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(){
|
2012-03-19 10:56:02 +00:00
|
|
|
switchPublicFolder(); // Execute the function after loading DOM tree
|
|
|
|
$('#publicEnable').click(function(){
|
2014-01-30 09:41:04 +00:00
|
|
|
switchPublicFolder(); // To get rid of onClick()
|
2012-03-19 10:56:02 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#allowZipDownload').bind('change', function() {
|
|
|
|
if($('#allowZipDownload').attr('checked')) {
|
|
|
|
$('#maxZipInputSize').removeAttr('disabled');
|
|
|
|
} else {
|
|
|
|
$('#maxZipInputSize').attr('disabled', 'disabled');
|
|
|
|
}
|
|
|
|
});
|
2011-07-09 19:44:50 +00:00
|
|
|
});
|