From e93f262eac858bc149872966c85e8019a1970d0a Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 16 Apr 2015 13:47:27 +0200 Subject: display warning if password changed or if the keys are not initialized --- apps/encryption/js/encryption.js | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) (limited to 'apps/encryption/js/encryption.js') diff --git a/apps/encryption/js/encryption.js b/apps/encryption/js/encryption.js index d2d1c3a1fc5..c02b4d74ae8 100644 --- a/apps/encryption/js/encryption.js +++ b/apps/encryption/js/encryption.js @@ -9,8 +9,33 @@ * @namespace * @memberOf OC */ -OC.Encryption={ - MIGRATION_OPEN:0, - MIGRATION_COMPLETED:1, - MIGRATION_IN_PROGRESS:-1, +OC.Encryption= { + MIGRATION_OPEN: 0, + MIGRATION_COMPLETED: 1, + MIGRATION_IN_PROGRESS: -1, + + + displayEncryptionWarning: function () { + + if (!OC.Notification.isHidden()) { + return; + } + + $.get( + OC.generateUrl('/apps/encryption/ajax/getStatus') + , function( result ) { + if (result.status === "success") { + OC.Notification.show(result.data.message); + } + } + ); + } }; + +$(document).ready(function() { + // wait for other apps/extensions to register their event handlers and file actions + // in the "ready" clause + _.defer(function() { + OC.Encryption.displayEncryptionWarning(); + }); +}); -- cgit v1.2.3