diff options
Diffstat (limited to 'settings/js/admin.js')
-rw-r--r-- | settings/js/admin.js | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js index 1e27c1be7e3..9cdb7f5b0f1 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -39,7 +39,7 @@ $(document).ready(function(){ } ); }); - $('#backgroundjobs span.crondate').tipsy({fade: true, gravity: 's', live: true}); + $('#backgroundjobs span.crondate').tipsy({gravity: 's', live: true}); $('#backgroundjobs input').change(function(){ if($(this).attr('checked')){ @@ -55,7 +55,7 @@ $(document).ready(function(){ }); $('#encryptionEnabled').change(function() { - $('#encryptionAPI div#selectEncryptionModules').toggleClass('hidden'); + $('#encryptionAPI div#EncryptionSettingsArea').toggleClass('hidden'); }); $('#encryptionAPI input').change(function() { @@ -70,6 +70,26 @@ $(document).ready(function(){ OC.AppConfig.setValue('core', $(this).attr('name'), value); }); + $('#startmigration').click(function(event){ + $(window).on('beforeunload.encryption', function(e) { + return t('settings', 'Migration in progress. Please wait until the migration is finished'); + }); + event.preventDefault(); + $('#startmigration').prop('disabled', true); + OC.msg.startAction('#startmigration_msg', t('settings', 'Migration started …')); + $.post(OC.generateUrl('/settings/admin/startmigration'), '', function(data){ + OC.msg.finishedAction('#startmigration_msg', data); + if (data['status'] === 'success') { + $('#encryptionAPI div#selectEncryptionModules').toggleClass('hidden'); + $('#encryptionAPI div#migrationWarning').toggleClass('hidden'); + } else { + $('#startmigration').prop('disabled', false); + } + $(window).off('beforeunload.encryption'); + + }); + }); + $('#shareAPI input:not(#excludedGroups)').change(function() { var value = $(this).val(); if ($(this).attr('type') === 'checkbox') { |