diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-06 15:53:38 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-06 15:53:38 +0200 |
commit | a594b41fb04458bf5a9007d81da6141b1650d658 (patch) | |
tree | 5a38d7274f607680341fd1c1337d651ac18d6ca3 /apps | |
parent | 78203ecc2ffffd9e26e117223d3e7533e52938ea (diff) | |
download | nextcloud-server-a594b41fb04458bf5a9007d81da6141b1650d658.tar.gz nextcloud-server-a594b41fb04458bf5a9007d81da6141b1650d658.zip |
Fix namespace conflict in OC.Encryption JS code
Diffstat (limited to 'apps')
-rw-r--r-- | apps/encryption/js/encryption.js | 8 | ||||
-rw-r--r-- | apps/encryption/js/settings-personal.js | 8 |
2 files changed, 4 insertions, 12 deletions
diff --git a/apps/encryption/js/encryption.js b/apps/encryption/js/encryption.js index a6c1bea89b2..361347b44b7 100644 --- a/apps/encryption/js/encryption.js +++ b/apps/encryption/js/encryption.js @@ -5,15 +5,11 @@ * See the COPYING-README file. */ -if (!OC.Encryption) { - OC.Encryption = {}; -} - /** * @namespace * @memberOf OC */ -OC.Encryption = { +OC.Encryption = _.extend(OC.Encryption || {}, { displayEncryptionWarning: function () { if (!OC.currentUser || !OC.Notification.isHidden()) { return; @@ -28,7 +24,7 @@ OC.Encryption = { } ); } -}; +}); $(document).ready(function() { // wait for other apps/extensions to register their event handlers and file actions // in the "ready" clause diff --git a/apps/encryption/js/settings-personal.js b/apps/encryption/js/settings-personal.js index fa94bea6bc5..75ebab5059c 100644 --- a/apps/encryption/js/settings-personal.js +++ b/apps/encryption/js/settings-personal.js @@ -4,11 +4,7 @@ * See the COPYING-README file. */ -if (!OC.Encryption) { - OC.Encryption = {}; -} - -OC.Encryption = { +OC.Encryption = _.extend(OC.Encryption || {}, { updatePrivateKeyPassword: function () { var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val(); var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val(); @@ -26,7 +22,7 @@ OC.Encryption = { OC.msg.finishedError('#ocDefaultEncryptionModule .msg', JSON.parse(jqXHR.responseText).message); }); } -}; +}); $(document).ready(function () { |