Fix race condition #2

This commit is contained in:
yflory 2017-02-17 15:39:34 +01:00
parent 1540ae3f6f
commit c17f28e5fe
4 changed files with 20 additions and 10 deletions

View File

@ -22,15 +22,15 @@ define([
Cryptpad: Cryptpad,
};
Cryptpad.styleAlerts();
Cryptpad.addLoadingScreen();
var ifrw = module.ifrw = $('#pad-iframe')[0].contentWindow;
var stringify = function (obj) {
return JSONSortify(obj);
};
$(function () {
Cryptpad.styleAlerts();
Cryptpad.addLoadingScreen();
var ifrw = module.ifrw = $('#pad-iframe')[0].contentWindow;
var stringify = function (obj) {
return JSONSortify(obj);
};
var toolbar;
var secret = Cryptpad.getSecrets();

View File

@ -21,6 +21,9 @@ define([
Visible, Notify) {
var $ = window.jQuery;
var saveAs = window.saveAs;
$(function () {
var ifrw = $('#pad-iframe')[0].contentWindow;
var Ckeditor; // to be initialized later...
var DiffDom = window.diffDOM;
@ -814,4 +817,6 @@ define([
};
$(first);
});
});

View File

@ -15,6 +15,8 @@ define([
], function (Config, Messages, TextPatcher, Listmap, Crypto, Cryptpad, Hyperjson, Renderer, Toolbar, Visible, Notify) {
var $ = window.jQuery;
$(function () {
var unlockHTML = '<i class="fa fa-unlock" aria-hidden="true"></i>';
var lockHTML = '<i class="fa fa-lock" aria-hidden="true"></i>';
var HIDE_INTRODUCTION_TEXT = "hide_poll_text";
@ -786,5 +788,7 @@ define([
onConnectError();
}
});
});
});

View File

@ -28,9 +28,7 @@ define([
var SLIDE_BACKCOLOR_ID = "cryptpad-backcolor";
var SLIDE_COLOR_ID = "cryptpad-color";
Cryptpad.styleAlerts();
Cryptpad.addLoadingScreen();
var stringify = function (obj) {
return JSONSortify(obj);
@ -45,6 +43,9 @@ define([
};
$(function () {
Cryptpad.styleAlerts();
Cryptpad.addLoadingScreen();
var ifrw = module.ifrw = $('#pad-iframe')[0].contentWindow;
var toolbar;