diff options
author | Clark Tomlinson <fallen013@gmail.com> | 2015-04-16 09:34:47 -0400 |
---|---|---|
committer | Clark Tomlinson <fallen013@gmail.com> | 2015-04-16 09:34:47 -0400 |
commit | 1174ad0681bb82252a26b5ee44d5b2990171932b (patch) | |
tree | 77f5d7d2e65e9d5eeedb3f36f0576cb5196ba09e /settings/js | |
parent | c7e5e30b86733a22ac0d411e00537b10e0220ddd (diff) | |
parent | 959665003b408ed837066307350fb76b83beaa52 (diff) | |
download | nextcloud-server-1174ad0681bb82252a26b5ee44d5b2990171932b.tar.gz nextcloud-server-1174ad0681bb82252a26b5ee44d5b2990171932b.zip |
Merge pull request #15445 from owncloud/enc2_migration
add migration script from old encryption to new one
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/admin.js | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js index 34f58db8688..9cdb7f5b0f1 100644 --- a/settings/js/admin.js +++ b/settings/js/admin.js @@ -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') { |