diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-21 12:01:56 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-21 12:01:56 +0200 |
commit | 4a2f8f81ca8dcc91c5b784077620517ec1011724 (patch) | |
tree | 5b6f5623b1d9da14b94e2d860bf1dbd63791bc49 /apps/encryption/js/encryption.js | |
parent | 55962c5f5ad0e03618a0a3c1267d72c8f607e2dd (diff) | |
download | nextcloud-server-4a2f8f81ca8dcc91c5b784077620517ec1011724.tar.gz nextcloud-server-4a2f8f81ca8dcc91c5b784077620517ec1011724.zip |
Don't pollute the global namespace
Diffstat (limited to 'apps/encryption/js/encryption.js')
-rw-r--r-- | apps/encryption/js/encryption.js | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/apps/encryption/js/encryption.js b/apps/encryption/js/encryption.js index 94203d93f7f..32b50553f77 100644 --- a/apps/encryption/js/encryption.js +++ b/apps/encryption/js/encryption.js @@ -5,27 +5,30 @@ * See the COPYING-README file. */ +if (!OC.Encryption) { + OC.Encryption = {}; +} -function displayEncryptionWarning () { - - if (!OC.Notification.isHidden()) { - return; - } - - $.get( - OC.generateUrl('/apps/encryption/ajax/getStatus'), - function( result ) { - if (result.status === "success") { - OC.Notification.show(result.data.message); - } +OC.Encryption = { + 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() { - displayEncryptionWarning(); + OC.Encryption.displayEncryptionWarning(); }); }); |