Fix namespace conflict in OC.Encryption JS code

This commit is contained in:
Vincent Petry 2015-08-06 15:53:38 +02:00
parent 78203ecc2f
commit a594b41fb0
2 changed files with 4 additions and 12 deletions

View File

@ -5,15 +5,11 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
if (!OC.Encryption) {
OC.Encryption = {};
}
/** /**
* @namespace * @namespace
* @memberOf OC * @memberOf OC
*/ */
OC.Encryption = { OC.Encryption = _.extend(OC.Encryption || {}, {
displayEncryptionWarning: function () { displayEncryptionWarning: function () {
if (!OC.currentUser || !OC.Notification.isHidden()) { if (!OC.currentUser || !OC.Notification.isHidden()) {
return; return;
@ -28,7 +24,7 @@ OC.Encryption = {
} }
); );
} }
}; });
$(document).ready(function() { $(document).ready(function() {
// wait for other apps/extensions to register their event handlers and file actions // wait for other apps/extensions to register their event handlers and file actions
// in the "ready" clause // in the "ready" clause

View File

@ -4,11 +4,7 @@
* See the COPYING-README file. * See the COPYING-README file.
*/ */
if (!OC.Encryption) { OC.Encryption = _.extend(OC.Encryption || {}, {
OC.Encryption = {};
}
OC.Encryption = {
updatePrivateKeyPassword: function () { updatePrivateKeyPassword: function () {
var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val(); var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val();
var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val(); var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val();
@ -26,7 +22,7 @@ OC.Encryption = {
OC.msg.finishedError('#ocDefaultEncryptionModule .msg', JSON.parse(jqXHR.responseText).message); OC.msg.finishedError('#ocDefaultEncryptionModule .msg', JSON.parse(jqXHR.responseText).message);
}); });
} }
}; });
$(document).ready(function () { $(document).ready(function () {