summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-04-09 16:07:15 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-04-16 14:15:04 +0200
commitd2ef73367c6fbc85a3032da405e1dad2fc714a4c (patch)
tree2ebcd339cc1547889adc96fe1cb15e331fd41697 /settings/js
parent6bcf88ca96bb7fc0a1f80de4a0a36e59d513dcc6 (diff)
downloadnextcloud-server-d2ef73367c6fbc85a3032da405e1dad2fc714a4c.tar.gz
nextcloud-server-d2ef73367c6fbc85a3032da405e1dad2fc714a4c.zip
allow user to start migration in admin settings if no external user back-ends are enabled
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/admin.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js
index 1e27c1be7e3..3c203bb3966 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') {