Merge pull request #7405 from owncloud/files-admin.js-style

coding style fixes, cut long lines, comments not on same lines, curly braces
This commit is contained in:
Vincent Petry 2014-02-26 11:10:05 +01:00
commit 37a2f8c6cb
1 changed files with 11 additions and 8 deletions

View File

@ -8,19 +8,22 @@
* *
*/ */
function switchPublicFolder() function switchPublicFolder() {
{
var publicEnable = $('#publicEnable').is(':checked'); var publicEnable = $('#publicEnable').is(':checked');
var sharingaimGroup = $('input:radio[name=sharingaim]'); //find all radiobuttons of that group // find all radiobuttons of that group
var sharingaimGroup = $('input:radio[name=sharingaim]');
$.each(sharingaimGroup, function(index, sharingaimItem) { $.each(sharingaimGroup, function(index, sharingaimItem) {
sharingaimItem.disabled = !publicEnable; //set all buttons to the correct state // set all buttons to the correct state
sharingaimItem.disabled = !publicEnable;
}); });
} }
$(document).ready(function(){ $(document).ready(function() {
switchPublicFolder(); // Execute the function after loading DOM tree // Execute the function after loading DOM tree
$('#publicEnable').click(function(){ switchPublicFolder();
switchPublicFolder(); // To get rid of onClick() $('#publicEnable').click(function() {
// To get rid of onClick()
switchPublicFolder();
}); });
$('#allowZipDownload').bind('change', function() { $('#allowZipDownload').bind('change', function() {