Welcome to mirror list, hosted at ThFree Co, Russian Federation.

admin.js « js « files « apps - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f735079fcbe5178cefe1805cec623e0483aa4eb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * 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');
	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()
	});

	$('#allowZipDownload').bind('change', function() {
		if($('#allowZipDownload').attr('checked')) {
			$('#maxZipInputSize').removeAttr('disabled');
		} else {
			$('#maxZipInputSize').attr('disabled', 'disabled');
		}
	});
});