Code refactoring

This commit is contained in:
RainLoop Team 2014-08-14 22:34:38 +04:00
parent 7c25098c1b
commit ff7b71fd6c
9 changed files with 203 additions and 211 deletions

View file

@ -1121,22 +1121,17 @@ RainLoopApp.prototype.bootstart = function ()
if (bValue)
{
if (window.crypto && window.crypto.getRandomValues && RL.capa(Enums.Capa.OpenPGP))
if (window.$LAB && window.crypto && window.crypto.getRandomValues && RL.capa(Enums.Capa.OpenPGP))
{
$.ajax({
'url': RL.link().openPgpJs(),
'dataType': 'script',
'cache': true,
'success': function () {
if (window.openpgp)
{
RL.data().openpgpKeyring = new window.openpgp.Keyring();
RL.data().capaOpenPGP(true);
window.$LAB.script(window.openpgp ? '' : RL.link().openPgpJs()).wait(function () {
if (window.openpgp)
{
RL.data().openpgpKeyring = new window.openpgp.Keyring();
RL.data().capaOpenPGP(true);
RL.pub('openpgp.init');
RL.pub('openpgp.init');
RL.reloadOpenPgpKeys();
}
RL.reloadOpenPgpKeys();
}
});
}