Merge pull request #18106 from owncloud/enc-jsnamespaceconflict

Fix namespace conflict in OC.Encryption JS code
This commit is contained in:
Björn Schießle 2015-08-06 17:40:25 +02:00
commit aeb4cdfb95
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 () {