summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/js/settings-admin.js
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2013-05-01 19:18:31 +0200
committerSam Tuke <samtuke@owncloud.com>2013-05-01 19:21:01 +0200
commitba29147e34a22142c4bfd2afa3f5b9f1e6efcd63 (patch)
tree643e10cc813c815253c78d4ab6650c42a8986c91 /apps/files_encryption/js/settings-admin.js
parentd3db4ee103903e97ec2cfb8430b14699f1f6e8ae (diff)
downloadnextcloud-server-ba29147e34a22142c4bfd2afa3f5b9f1e6efcd63.tar.gz
nextcloud-server-ba29147e34a22142c4bfd2afa3f5b9f1e6efcd63.zip
Fixed recoveryadmin settings in user and admin settings pages (js, templates, ajax)
Renamed recovery methods in Util{} for clarity Added note about bug causing slow page load and redundant keypair generation recoveryAdmin functionality not yet complete
Diffstat (limited to 'apps/files_encryption/js/settings-admin.js')
-rw-r--r--apps/files_encryption/js/settings-admin.js37
1 files changed, 37 insertions, 0 deletions
diff --git a/apps/files_encryption/js/settings-admin.js b/apps/files_encryption/js/settings-admin.js
new file mode 100644
index 00000000000..48b5598d524
--- /dev/null
+++ b/apps/files_encryption/js/settings-admin.js
@@ -0,0 +1,37 @@
+/**
+ * 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.
+ */
+
+
+$(document).ready(function(){
+ // Trigger ajax on filetype blacklist change
+ $('#encryption_blacklist').multiSelect({
+ oncheck:blackListChange,
+ onuncheck:blackListChange,
+ createText:'...'
+ });
+
+ // Trigger ajax on recoveryAdmin status change
+ $( 'input:radio[name="adminEnableRecovery"]' ).change(
+ function() {
+
+ var recoveryStatus = $( this ).val();
+
+ $.post(
+ OC.filePath( 'files_encryption', 'ajax', 'adminrecovery.php' )
+ , { adminEnableRecovery: recoveryStatus, recoveryPassword: 'password' }
+ , function( data ) {
+ alert( data );
+ }
+ );
+ }
+ );
+
+ function blackListChange(){
+ var blackList=$( '#encryption_blacklist' ).val().join( ',' );
+ OC.AppConfig.setValue( 'files_encryption', 'type_blacklist', blackList );
+ }
+}) \ No newline at end of file