2015-03-26 20:35:36 -04: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-21 06:19:15 -04:00
|
|
|
/**
|
|
|
|
|
* @namespace
|
|
|
|
|
* @memberOf OC
|
|
|
|
|
*/
|
2015-08-06 09:53:38 -04:00
|
|
|
OC.Encryption = _.extend(OC.Encryption || {}, {
|
2015-04-21 06:01:56 -04:00
|
|
|
displayEncryptionWarning: function () {
|
2015-04-23 07:06:00 -04:00
|
|
|
if (!OC.currentUser || !OC.Notification.isHidden()) {
|
2015-04-21 06:01:56 -04:00
|
|
|
return;
|
2015-04-17 12:04:02 -04:00
|
|
|
}
|
2015-04-16 07:47:27 -04:00
|
|
|
|
2015-04-21 06:01:56 -04:00
|
|
|
$.get(
|
|
|
|
|
OC.generateUrl('/apps/encryption/ajax/getStatus'),
|
|
|
|
|
function (result) {
|
2015-05-27 05:10:06 -04:00
|
|
|
if (result.status === "interactionNeeded") {
|
2015-04-21 06:01:56 -04:00
|
|
|
OC.Notification.show(result.data.message);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
2015-08-06 09:53:38 -04:00
|
|
|
});
|
2020-07-20 06:30:35 -04:00
|
|
|
window.addEventListener('DOMContentLoaded', function() {
|
2015-04-16 07:47:27 -04:00
|
|
|
// wait for other apps/extensions to register their event handlers and file actions
|
|
|
|
|
// in the "ready" clause
|
|
|
|
|
_.defer(function() {
|
2015-04-21 06:01:56 -04:00
|
|
|
OC.Encryption.displayEncryptionWarning();
|
2015-04-16 07:47:27 -04:00
|
|
|
});
|
|
|
|
|
});
|