Fix race conditions that could prevent applications from being loaded
This commit is contained in:
@@ -12,9 +12,6 @@ define([
|
|||||||
Cryptpad: Cryptpad,
|
Cryptpad: Cryptpad,
|
||||||
};
|
};
|
||||||
|
|
||||||
DecorateToolbar.main($('#bottom-bar'));
|
|
||||||
Cryptpad.styleAlerts();
|
|
||||||
|
|
||||||
var padTypes = {
|
var padTypes = {
|
||||||
'/pad/': Messages.type.pad,
|
'/pad/': Messages.type.pad,
|
||||||
'/code/': Messages.type.code,
|
'/code/': Messages.type.code,
|
||||||
@@ -22,9 +19,9 @@ define([
|
|||||||
'/slide/': Messages.type.slide,
|
'/slide/': Messages.type.slide,
|
||||||
};
|
};
|
||||||
|
|
||||||
var $table = $('table.scroll');
|
var $table;
|
||||||
var $tbody = $table.find('tbody');
|
var $tbody;
|
||||||
var $tryit = $('#tryit');
|
var $tryit;
|
||||||
var now = new Date();
|
var now = new Date();
|
||||||
var hasRecent = false;
|
var hasRecent = false;
|
||||||
|
|
||||||
@@ -138,11 +135,18 @@ define([
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
displayCreateButtons();
|
|
||||||
Cryptpad.ready(function () {
|
Cryptpad.ready(function () {
|
||||||
console.log("ready");
|
console.log("ready");
|
||||||
refreshTable();
|
|
||||||
|
|
||||||
|
$table = $('table.scroll');
|
||||||
|
$tbody = $table.find('tbody');
|
||||||
|
$tryit = $('#tryit');
|
||||||
|
|
||||||
|
DecorateToolbar.main($('#bottom-bar'));
|
||||||
|
Cryptpad.styleAlerts();
|
||||||
|
|
||||||
|
displayCreateButtons();
|
||||||
|
refreshTable();
|
||||||
if (Cryptpad.store && Cryptpad.store.change) {
|
if (Cryptpad.store && Cryptpad.store.change) {
|
||||||
Cryptpad.store.change(function (data) {
|
Cryptpad.store.change(function (data) {
|
||||||
if (data.key === 'CryptPad_RECENTPADS') {
|
if (data.key === 'CryptPad_RECENTPADS') {
|
||||||
|
|||||||
@@ -557,7 +557,20 @@ define([
|
|||||||
Store.ready(function (err, store) {
|
Store.ready(function (err, store) {
|
||||||
common.store = env.store = store;
|
common.store = env.store = store;
|
||||||
|
|
||||||
cb();
|
$(function() {
|
||||||
|
if($('#pad-iframe').length) {
|
||||||
|
var $iframe = $('#pad-iframe');
|
||||||
|
var iframe = $iframe[0];
|
||||||
|
var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;
|
||||||
|
if (iframeDoc.readyState === 'complete') {
|
||||||
|
cb();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$iframe.load(cb);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
cb();
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
/*
|
/*
|
||||||
authorize(function (err, proxy) {
|
authorize(function (err, proxy) {
|
||||||
|
|||||||
Reference in New Issue
Block a user