use a simple function - OC.Encryption is already defined - fixes #15707

This commit is contained in:
Thomas Müller 2015-04-17 17:57:17 +02:00
parent f2fe9fffd9
commit c1a60a2349
1 changed files with 14 additions and 24 deletions

View File

@ -5,37 +5,27 @@
* See the COPYING-README file.
*/
/**
* @namespace
* @memberOf OC
*/
OC.Encryption= {
MIGRATION_OPEN: 0,
MIGRATION_COMPLETED: 1,
MIGRATION_IN_PROGRESS: -1,
function displayEncryptionWarning () {
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);
}
}
);
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() {
OC.Encryption.displayEncryptionWarning();
displayEncryptionWarning();
});
});