server/apps/encryption/js/encryption.js

35 lines
816 B
JavaScript
Raw Normal View History

2015-03-27 00:35:36 +00: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 10:19:15 +00:00
/**
* @namespace
* @memberOf OC
*/
OC.Encryption = _.extend(OC.Encryption || {}, {
2015-04-21 10:01:56 +00:00
displayEncryptionWarning: function () {
if (!OC.currentUser || !OC.Notification.isHidden()) {
2015-04-21 10:01:56 +00:00
return;
}
2015-04-21 10:01:56 +00:00
$.get(
OC.generateUrl('/apps/encryption/ajax/getStatus'),
function (result) {
2015-05-27 09:10:06 +00:00
if (result.status === "interactionNeeded") {
2015-04-21 10:01:56 +00:00
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() {
2015-04-21 10:01:56 +00:00
OC.Encryption.displayEncryptionWarning();
});
});