From 53bb89824deaf97095acf6bcc2997aa7141dd573 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Mon, 12 Aug 2013 17:25:27 +0200 Subject: check if some encrypted files are left after the app was disabled and warn the user --- apps/files/js/files.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'apps/files/js/files.js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 98fc53b71a9..d6886fc17e4 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -81,9 +81,23 @@ Files={ if (usedSpacePercent > 90) { OC.Notification.show(t('files', 'Your storage is almost full ({usedSpacePercent}%)', {usedSpacePercent: usedSpacePercent})); } + }, + + displayEncryptionWarning: function() { + + if (!OC.Notification.isHidden()) { + return; + } + + var encryptedFiles = $('#encryptedFiles').val(); + if (encryptedFiles === '1') { + OC.Notification.show(t('files_encryption', 'Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.', "www.schiessle.org")); + return; + } } }; $(document).ready(function() { + Files.displayEncryptionWarning(); Files.bindKeyboardShortcuts(document, jQuery); $('#fileList tr').each(function(){ //little hack to set unescape filenames in attribute -- cgit v1.2.3 From 7adfc27cafa6f94962a33c158af9c45e71e012c5 Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 15 Aug 2013 13:13:16 +0200 Subject: remove whitespaces and some leftover code from testing --- apps/files/js/files.js | 2 +- apps/files_encryption/lib/crypt.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/files/js/files.js') diff --git a/apps/files/js/files.js b/apps/files/js/files.js index d6886fc17e4..f5db0207966 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -91,7 +91,7 @@ Files={ var encryptedFiles = $('#encryptedFiles').val(); if (encryptedFiles === '1') { - OC.Notification.show(t('files_encryption', 'Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.', "www.schiessle.org")); + OC.Notification.show(t('files_encryption', 'Encryption was disabled but your files are still encrypted. Please go to your personal settings to decrypt your files.')); return; } } diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 759e14b40b2..6543a0de5f3 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -662,5 +662,5 @@ class Crypt { return rtrim($result, "\0"); } } - + } \ No newline at end of file -- cgit v1.2.3