diff options
Diffstat (limited to 'apps/encryption/js/encryption.js')
-rw-r--r-- | apps/encryption/js/encryption.js | 33 |
1 files changed, 29 insertions, 4 deletions
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(); + }); +}); |