2015-03-27 03:35:36 +03:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2014
|
|
|
|
* Bjoern Schiessle <schiessle@owncloud.com>
|
|
|
|
* This file is licensed under the Affero General Public License version 3 or later.
|
|
|
|
* See the COPYING-README file.
|
|
|
|
*/
|
|
|
|
|
2015-04-17 19:02:00 +03:00
|
|
|
/**
|
|
|
|
* @namespace
|
|
|
|
* @memberOf OC
|
|
|
|
*/
|
|
|
|
OC.Encryption= {
|
|
|
|
MIGRATION_OPEN: 0,
|
|
|
|
MIGRATION_COMPLETED: 1,
|
|
|
|
MIGRATION_IN_PROGRESS: -1,
|
2015-04-16 14:47:27 +03:00
|
|
|
|
|
|
|
|
2015-04-17 19:02:00 +03:00
|
|
|
displayEncryptionWarning: function () {
|
2015-04-16 14:47:27 +03:00
|
|
|
|
2015-04-17 19:02:00 +03:00
|
|
|
if (!OC.Notification.isHidden()) {
|
|
|
|
return;
|
2015-04-17 18:57:17 +03:00
|
|
|
}
|
2015-04-17 19:02:00 +03:00
|
|
|
|
|
|
|
$.get(
|
|
|
|
OC.generateUrl('/apps/encryption/ajax/getStatus')
|
|
|
|
, function( result ) {
|
|
|
|
if (result.status === "success") {
|
|
|
|
OC.Notification.show(result.data.message);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|
|
|
|
};
|
2015-04-16 14:47:27 +03:00
|
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
// wait for other apps/extensions to register their event handlers and file actions
|
|
|
|
// in the "ready" clause
|
|
|
|
_.defer(function() {
|
2015-04-17 19:02:00 +03:00
|
|
|
OC.Encryption.displayEncryptionWarning();
|
2015-04-16 14:47:27 +03:00
|
|
|
});
|
|
|
|
});
|