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.
*/
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

View File

@ -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 () {