Switch to public API

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2016-09-20 11:17:13 +02:00
parent 0b1fb180a5
commit 103bf6dd28
No known key found for this signature in database
GPG Key ID: E166FD8976B3BAC8
5 changed files with 20 additions and 20 deletions

View File

@ -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);
});
});

View File

@ -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

View File

@ -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);
});
});

View File

@ -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() {

View File

@ -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');
}
});