diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-17 18:02:00 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-17 18:02:00 +0200 |
commit | 0ca6398aa34e0a3698f3aed0305f0e9299578bbc (patch) | |
tree | e1bd43bc6a664e69c8587cf18713cd429b2ae97e /apps/encryption | |
parent | a255866a937d906dbbe0ed46aa7394326b30e4f5 (diff) | |
download | nextcloud-server-0ca6398aa34e0a3698f3aed0305f0e9299578bbc.tar.gz nextcloud-server-0ca6398aa34e0a3698f3aed0305f0e9299578bbc.zip |
Revert "use a simple function - OC.Encryption is already defined - fixes #15707"
This reverts commit c1a60a23498abe6502d207b8c803255e31515577.
Diffstat (limited to 'apps/encryption')
-rw-r--r-- | apps/encryption/js/encryption.js | 36 |
1 files changed, 23 insertions, 13 deletions
diff --git a/apps/encryption/js/encryption.js b/apps/encryption/js/encryption.js index 94203d93f7f..c02b4d74ae8 100644 --- a/apps/encryption/js/encryption.js +++ b/apps/encryption/js/encryption.js @@ -5,27 +5,37 @@ * See the COPYING-README file. */ +/** + * @namespace + * @memberOf OC + */ +OC.Encryption= { + MIGRATION_OPEN: 0, + MIGRATION_COMPLETED: 1, + MIGRATION_IN_PROGRESS: -1, -function displayEncryptionWarning () { - if (!OC.Notification.isHidden()) { - return; - } + displayEncryptionWarning: function () { - $.get( - OC.generateUrl('/apps/encryption/ajax/getStatus'), - function( result ) { - if (result.status === "success") { - OC.Notification.show(result.data.message); - } + 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() { - displayEncryptionWarning(); + OC.Encryption.displayEncryptionWarning(); }); }); |