Skip to content
Snippets Groups Projects
Commit 0a2c676c authored by Morris Jobke's avatar Morris Jobke
Browse files

fix camelCase and avoiud re-wrapping $()

parent 78b6f595
Branches
No related tags found
No related merge requests found
...@@ -312,7 +312,7 @@ $(document).ready(function() { ...@@ -312,7 +312,7 @@ $(document).ready(function() {
OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'yes'); OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'yes');
$('input[name="allowUserMountingBackends\\[\\]"]').prop('checked', true); $('input[name="allowUserMountingBackends\\[\\]"]').prop('checked', true);
$('#userMountingBackends').removeClass('hidden'); $('#userMountingBackends').removeClass('hidden');
$($('input[name="allowUserMountingBackends\\[\\]"]')[0]).trigger('change'); $('input[name="allowUserMountingBackends\\[\\]"]').eq(0).trigger('change');
} else { } else {
OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'no'); OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'no');
$('#userMountingBackends').addClass('hidden'); $('#userMountingBackends').addClass('hidden');
...@@ -322,12 +322,12 @@ $(document).ready(function() { ...@@ -322,12 +322,12 @@ $(document).ready(function() {
$('input[name="allowUserMountingBackends\\[\\]"]').bind('change', function() { $('input[name="allowUserMountingBackends\\[\\]"]').bind('change', function() {
OC.msg.startSaving('#userMountingMsg'); OC.msg.startSaving('#userMountingMsg');
var user_mounting_backends = $('input[name="allowUserMountingBackends\\[\\]"]:checked').map(function(){return $(this).val();}).get(); var userMountingBackends = $('input[name="allowUserMountingBackends\\[\\]"]:checked').map(function(){return $(this).val();}).get();
OC.AppConfig.setValue('files_external', 'user_mounting_backends', user_mounting_backends.join()); OC.AppConfig.setValue('files_external', 'user_mounting_backends', userMountingBackends.join());
OC.msg.finishedSaving('#userMountingMsg', {status: 'success', data: {message: t('settings', 'Saved')}}); OC.msg.finishedSaving('#userMountingMsg', {status: 'success', data: {message: t('settings', 'Saved')}});
// disable allowUserMounting // disable allowUserMounting
if(user_mounting_backends.length === 0) { if(userMountingBackends.length === 0) {
$('#allowUserMounting').prop('checked', false); $('#allowUserMounting').prop('checked', false);
$('#allowUserMounting').trigger('change'); $('#allowUserMounting').trigger('change');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment