diff options
Diffstat (limited to 'apps/files_encryption/js')
-rw-r--r-- | apps/files_encryption/js/settings-admin.js (renamed from apps/files_encryption/js/settings.js) | 13 | ||||
-rw-r--r-- | apps/files_encryption/js/settings-personal.js | 23 |
2 files changed, 30 insertions, 6 deletions
diff --git a/apps/files_encryption/js/settings.js b/apps/files_encryption/js/settings-admin.js index 9a0bebf2478..48b5598d524 100644 --- a/apps/files_encryption/js/settings.js +++ b/apps/files_encryption/js/settings-admin.js @@ -1,5 +1,6 @@ /** - * Copyright (c) 2011, Robin Appelman <icewind1991@gmail.com> + * Copyright (c) 2013, Sam Tuke <samtuke@owncloud.com>, Robin Appelman + * <icewind1991@gmail.com> * This file is licensed under the Affero General Public License version 3 or later. * See the COPYING-README file. */ @@ -17,11 +18,11 @@ $(document).ready(function(){ $( 'input:radio[name="adminEnableRecovery"]' ).change( function() { - var foo = $( this ).val(); + var recoveryStatus = $( this ).val(); $.post( - OC.filePath('files_encryption', 'ajax', 'adminrecovery.php') - , { adminEnableRecovery: foo, recoveryPassword: 'password' } + OC.filePath( 'files_encryption', 'ajax', 'adminrecovery.php' ) + , { adminEnableRecovery: recoveryStatus, recoveryPassword: 'password' } , function( data ) { alert( data ); } @@ -30,7 +31,7 @@ $(document).ready(function(){ ); function blackListChange(){ - var blackList=$('#encryption_blacklist').val().join(','); - OC.AppConfig.setValue('files_encryption','type_blacklist',blackList); + var blackList=$( '#encryption_blacklist' ).val().join( ',' ); + OC.AppConfig.setValue( 'files_encryption', 'type_blacklist', blackList ); } })
\ No newline at end of file diff --git a/apps/files_encryption/js/settings-personal.js b/apps/files_encryption/js/settings-personal.js new file mode 100644 index 00000000000..e4a1b7448f4 --- /dev/null +++ b/apps/files_encryption/js/settings-personal.js @@ -0,0 +1,23 @@ +/** + * Copyright (c) 2013, Sam Tuke <samtuke@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or later. + * See the COPYING-README file. + */ + +$(document).ready(function(){ + // Trigger ajax on recoveryAdmin status change + $( 'input:radio[name="userEnableRecovery"]' ).change( + function() { + + var recoveryStatus = $( this ).val(); + + $.post( + OC.filePath( 'files_encryption', 'ajax', 'userrecovery.php' ) + , { userEnableRecovery: recoveryStatus } + , function( data ) { + alert( data ); + } + ); + } + ); +})
\ No newline at end of file |