From 103bf6dd287a70d48a8e47543873708056b7fe0f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 20 Sep 2016 11:17:13 +0200 Subject: [PATCH] Switch to public API Signed-off-by: Joas Schilling --- .../federatedfilesharing/js/settings-admin.js | 2 +- apps/files_external/js/settings.js | 6 +++--- apps/updatenotification/js/admin.js | 2 +- settings/js/admin.js | 10 +++++----- settings/js/users/users.js | 20 +++++++++---------- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/apps/federatedfilesharing/js/settings-admin.js b/apps/federatedfilesharing/js/settings-admin.js index 257c864b04f..a0b8feb945e 100644 --- a/apps/federatedfilesharing/js/settings-admin.js +++ b/apps/federatedfilesharing/js/settings-admin.js @@ -5,7 +5,7 @@ $(document).ready(function() { if (this.checked) { value = 'yes'; } - OC.AppConfig.setValue('files_sharing', $(this).attr('name'), value); + OCP.AppConfig.setValue('files_sharing', $(this).attr('name'), value); }); }); diff --git a/apps/files_external/js/settings.js b/apps/files_external/js/settings.js index da3e2397b7e..0270b7a6957 100644 --- a/apps/files_external/js/settings.js +++ b/apps/files_external/js/settings.js @@ -1317,12 +1317,12 @@ $(document).ready(function() { $allowUserMounting.bind('change', function() { OC.msg.startSaving('#userMountingMsg'); if (this.checked) { - OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'yes'); + OCP.AppConfig.setValue('files_external', 'allow_user_mounting', 'yes'); $('input[name="allowUserMountingBackends\\[\\]"]').prop('checked', true); $('#userMountingBackends').removeClass('hidden'); $('input[name="allowUserMountingBackends\\[\\]"]').eq(0).trigger('change'); } else { - OC.AppConfig.setValue('files_external', 'allow_user_mounting', 'no'); + OCP.AppConfig.setValue('files_external', 'allow_user_mounting', 'no'); $('#userMountingBackends').addClass('hidden'); } OC.msg.finishedSaving('#userMountingMsg', {status: 'success', data: {message: t('files_external', 'Saved')}}); @@ -1342,7 +1342,7 @@ $(document).ready(function() { }).get(); userMountingBackends = userMountingBackends.concat(deprecatedBackends); - OC.AppConfig.setValue('files_external', 'user_mounting_backends', userMountingBackends.join()); + OCP.AppConfig.setValue('files_external', 'user_mounting_backends', userMountingBackends.join()); OC.msg.finishedSaving('#userMountingMsg', {status: 'success', data: {message: t('files_external', 'Saved')}}); // disable allowUserMounting diff --git a/apps/updatenotification/js/admin.js b/apps/updatenotification/js/admin.js index 91d9f80b605..813ec48c87a 100644 --- a/apps/updatenotification/js/admin.js +++ b/apps/updatenotification/js/admin.js @@ -70,6 +70,6 @@ $(document).ready(function(){ $notificationTargetGroups.change(function(ev) { var groups = ev.val || []; groups = JSON.stringify(groups); - OC.AppConfig.setValue('updatenotification', 'notify_groups', groups); + OCP.AppConfig.setValue('updatenotification', 'notify_groups', groups); }); }); diff --git a/settings/js/admin.js b/settings/js/admin.js index 430947e5956..f5750b23790 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -24,7 +24,7 @@ $(document).ready(function(){ $(element).change(function(ev) { var groups = ev.val || []; groups = JSON.stringify(groups); - OC.AppConfig.setValue('core', $(this).attr('name'), groups); + OCP.AppConfig.setValue('core', $(this).attr('name'), groups); }); }); @@ -41,9 +41,9 @@ $(document).ready(function(){ if($(this).is(':checked')){ var mode = $(this).val(); if (mode === 'ajax' || mode === 'webcron' || mode === 'cron') { - OC.AppConfig.setValue('core', 'backgroundjobs_mode', mode); + OCP.AppConfig.setValue('core', 'backgroundjobs_mode', mode); // clear cron errors on background job mode change - OC.AppConfig.deleteKey('core', 'cronErrors'); + OCP.AppConfig.deleteKey('core', 'cronErrors'); } } }); @@ -59,7 +59,7 @@ $(document).ready(function(){ $('#reallyEnableEncryption').click(function() { $('#encryptionAPI div#EncryptionWarning').toggleClass('hidden'); $('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden'); - OC.AppConfig.setValue('core', 'encryption_enabled', 'yes'); + OCP.AppConfig.setValue('core', 'encryption_enabled', 'yes'); $('#enableEncryption').attr('disabled', 'disabled'); }); @@ -99,7 +99,7 @@ $(document).ready(function(){ value = 'no'; } } - OC.AppConfig.setValue('core', $(this).attr('name'), value); + OCP.AppConfig.setValue('core', $(this).attr('name'), value); }); $('#shareapiDefaultExpireDate').change(function() { diff --git a/settings/js/users/users.js b/settings/js/users/users.js index d25f9d92db2..3a357c0e9c4 100644 --- a/settings/js/users/users.js +++ b/settings/js/users/users.js @@ -875,10 +875,10 @@ $(document).ready(function () { $('#CheckboxStorageLocation').click(function() { if ($('#CheckboxStorageLocation').is(':checked')) { $("#userlist .storageLocation").show(); - OC.AppConfig.setValue('core', 'umgmt_show_storage_location', 'true'); + OCP.AppConfig.setValue('core', 'umgmt_show_storage_location', 'true'); } else { $("#userlist .storageLocation").hide(); - OC.AppConfig.setValue('core', 'umgmt_show_storage_location', 'false'); + OCP.AppConfig.setValue('core', 'umgmt_show_storage_location', 'false'); } }); @@ -889,10 +889,10 @@ $(document).ready(function () { $('#CheckboxLastLogin').click(function() { if ($('#CheckboxLastLogin').is(':checked')) { $("#userlist .lastLogin").show(); - OC.AppConfig.setValue('core', 'umgmt_show_last_login', 'true'); + OCP.AppConfig.setValue('core', 'umgmt_show_last_login', 'true'); } else { $("#userlist .lastLogin").hide(); - OC.AppConfig.setValue('core', 'umgmt_show_last_login', 'false'); + OCP.AppConfig.setValue('core', 'umgmt_show_last_login', 'false'); } }); @@ -903,10 +903,10 @@ $(document).ready(function () { $('#CheckboxEmailAddress').click(function() { if ($('#CheckboxEmailAddress').is(':checked')) { $("#userlist .mailAddress").show(); - OC.AppConfig.setValue('core', 'umgmt_show_email', 'true'); + OCP.AppConfig.setValue('core', 'umgmt_show_email', 'true'); } else { $("#userlist .mailAddress").hide(); - OC.AppConfig.setValue('core', 'umgmt_show_email', 'false'); + OCP.AppConfig.setValue('core', 'umgmt_show_email', 'false'); } }); @@ -917,10 +917,10 @@ $(document).ready(function () { $('#CheckboxUserBackend').click(function() { if ($('#CheckboxUserBackend').is(':checked')) { $("#userlist .userBackend").show(); - OC.AppConfig.setValue('core', 'umgmt_show_backend', 'true'); + OCP.AppConfig.setValue('core', 'umgmt_show_backend', 'true'); } else { $("#userlist .userBackend").hide(); - OC.AppConfig.setValue('core', 'umgmt_show_backend', 'false'); + OCP.AppConfig.setValue('core', 'umgmt_show_backend', 'false'); } }); @@ -931,10 +931,10 @@ $(document).ready(function () { $('#CheckboxMailOnUserCreate').click(function() { if ($('#CheckboxMailOnUserCreate').is(':checked')) { $("#newemail").show(); - OC.AppConfig.setValue('core', 'umgmt_send_email', 'true'); + OCP.AppConfig.setValue('core', 'umgmt_send_email', 'true'); } else { $("#newemail").hide(); - OC.AppConfig.setValue('core', 'umgmt_send_email', 'false'); + OCP.AppConfig.setValue('core', 'umgmt_send_email', 'false'); } }); -- 2.39.5