nextcloud/apps/files/js/admin.js

37 lines
923 B
JavaScript
Raw Normal View History

/*
* Copyright (c) 2014
*
* This file is licensed under the Affero General Public License version 3
* or later.
*
* See the COPYING-README file.
*
*/
function switchPublicFolder() {
var publicEnable = $('#publicEnable').is(':checked');
// find all radiobuttons of that group
var sharingaimGroup = $('input:radio[name=sharingaim]');
$.each(sharingaimGroup, function(index, sharingaimItem) {
// set all buttons to the correct state
sharingaimItem.disabled = !publicEnable;
});
2011-07-09 23:44:50 +04:00
}
$(document).ready(function() {
// Execute the function after loading DOM tree
switchPublicFolder();
$('#publicEnable').click(function() {
// To get rid of onClick()
switchPublicFolder();
});
$('#allowZipDownload').bind('change', function() {
if($('#allowZipDownload').attr('checked')) {
$('#maxZipInputSize').removeAttr('disabled');
} else {
$('#maxZipInputSize').attr('disabled', 'disabled');
}
});
2011-07-09 23:44:50 +04:00
});