Fix incorrect Javascript for changing Share API settings

This commit is contained in:
Michael Gapczynski 2012-08-27 20:45:36 -04:00
parent 9cd55508c3
commit 42a291286b
1 changed files with 8 additions and 5 deletions

View File

@ -19,12 +19,15 @@ $(document).ready(function(){
});
$('#shareAPI input').change(function() {
if ($(this).attr('type') == 'radio') {
console.log('radio');
}
if ($(this).attr('type') == 'checkbox') {
console.log('checked');
if (this.checked) {
var value = 'yes';
} else {
var value = 'no';
}
} else {
var value = $(this).val()
}
OC.AppConfig.setValue('core', 'shareapi_', $(this).val());
OC.AppConfig.setValue('core', $(this).attr('name'), value);
});
});