Blame view
sources/apps/files/js/admin.js
699 Bytes
|
6d9380f96
|
1 2 3 4 5 6 7 8 9 10 11 |
/*
* Copyright (c) 2014
*
* This file is licensed under the Affero General Public License version 3
* or later.
*
* See the COPYING-README file.
*
*/
function switchPublicFolder() {
|
|
03e52840d
|
12 |
var publicEnable = $('#publicEnable').is(':checked');
|
|
6d9380f96
|
13 14 |
// find all radiobuttons of that group
var sharingaimGroup = $('input:radio[name=sharingaim]');
|
|
03e52840d
|
15 |
$.each(sharingaimGroup, function(index, sharingaimItem) {
|
|
6d9380f96
|
16 17 |
// set all buttons to the correct state sharingaimItem.disabled = !publicEnable; |
|
03e52840d
|
18 19 |
}); } |
|
6d9380f96
|
20 21 22 23 24 25 |
$(document).ready(function() {
// Execute the function after loading DOM tree
switchPublicFolder();
$('#publicEnable').click(function() {
// To get rid of onClick()
switchPublicFolder();
|
|
03e52840d
|
26 27 |
}); }); |