summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/js
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2014-10-07 12:52:01 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2014-10-07 12:52:01 +0200
commitb060123155d82d59c981b89600a3a1b2c9f37bc9 (patch)
treeb853aeaeac696dc1f7eabdcd412c7ef5b1ea68c5 /apps/files_encryption/js
parent794d3ef949b487011805d50e851e5a07ad7776d4 (diff)
downloadnextcloud-server-b060123155d82d59c981b89600a3a1b2c9f37bc9.tar.gz
nextcloud-server-b060123155d82d59c981b89600a3a1b2c9f37bc9.zip
improved visual feedback if user enabled recovery key
Diffstat (limited to 'apps/files_encryption/js')
-rw-r--r--apps/files_encryption/js/settings-personal.js21
1 files changed, 6 insertions, 15 deletions
diff --git a/apps/files_encryption/js/settings-personal.js b/apps/files_encryption/js/settings-personal.js
index f857c2c9f05..b798ba7e4e1 100644
--- a/apps/files_encryption/js/settings-personal.js
+++ b/apps/files_encryption/js/settings-personal.js
@@ -26,36 +26,27 @@ $(document).ready(function(){
// Trigger ajax on recoveryAdmin status change
$( 'input:radio[name="userEnableRecovery"]' ).change(
function() {
-
- // Hide feedback messages in case they're already visible
- $('#recoveryEnabledSuccess').hide();
- $('#recoveryEnabledError').hide();
-
var recoveryStatus = $( this ).val();
-
+ OC.msg.startAction('#userEnableRecovery .msg', 'Updating recovery keys. This can take some time...');
$.post(
OC.filePath( 'files_encryption', 'ajax', 'userrecovery.php' )
, { userEnableRecovery: recoveryStatus }
, function( data ) {
- if ( data.status == "success" ) {
- $('#recoveryEnabledSuccess').show();
- } else {
- $('#recoveryEnabledError').show();
- }
+ OC.msg.finishedAction('#userEnableRecovery .msg', data);
}
);
// Ensure page is not reloaded on form submit
return false;
}
);
-
+
$("#encryptAll").click(
function(){
-
+
// Hide feedback messages in case they're already visible
$('#encryptAllSuccess').hide();
$('#encryptAllError').hide();
-
+
var userPassword = $( '#userPassword' ).val();
var encryptAll = $( '#encryptAll' ).val();
@@ -73,7 +64,7 @@ $(document).ready(function(){
// Ensure page is not reloaded on form submit
return false;
}
-
+
);
// update private key password