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') 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