Merge branch 'staging' into soon

pull/1/head
ansuz 3 years ago
commit ecf188d8df

@ -1804,6 +1804,7 @@ define([
} }
if (APP.isDownload) { if (APP.isDownload) {
delete APP.isDownload;
var bin = getContent(); var bin = getContent();
if (!supportsXLSX()) { if (!supportsXLSX()) {
return void sframeChan.event('EV_OOIFRAME_DONE', bin, {raw: true}); return void sframeChan.event('EV_OOIFRAME_DONE', bin, {raw: true});
@ -2008,6 +2009,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
var blobUrl = (typeof mediasData[data.src] === 'undefined') ? "" : mediasData[data.src].blobUrl; var blobUrl = (typeof mediasData[data.src] === 'undefined') ? "" : mediasData[data.src].blobUrl;
if (blobUrl) { if (blobUrl) {
delete downloadImages[name];
debug("CryptPad Image already loaded " + blobUrl); debug("CryptPad Image already loaded " + blobUrl);
return void callback(blobUrl); return void callback(blobUrl);
} }
@ -2556,7 +2558,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
type:'text/javascript', type:'text/javascript',
src: '/common/onlyoffice/'+version+'web-apps/apps/api/documents/api.js' src: '/common/onlyoffice/'+version+'web-apps/apps/api/documents/api.js'
}); });
$('#cp-app-oo-editor').append(s); $('#cp-app-oo-editor').empty().append(h('div#cp-app-oo-placeholder-a')).append(s);
var hashes = content.hashes || {}; var hashes = content.hashes || {};
var idx = sortCpIndex(hashes); var idx = sortCpIndex(hashes);

@ -15,15 +15,17 @@ define([
var create = function (config) { var create = function (config) {
// Loaded in load #2 // Loaded in load #2
var sframeChan; var sframeChan;
var Util = config.modules.Utils.Util;
var _onReadyEvt = Util.mkEvent(true);
var refresh = function (data, cb) { var refresh = function (data, cb) {
if (currentCb) { if (currentCb) {
queue.push({data: data, cb: cb}); queue.push({data: data, cb: cb});
return; return;
} }
if (!ready) { if (!ready) {
ready = function () { _onReadyEvt.reg(function () {
refresh(data, cb); refresh(data, cb);
}; });
return; return;
} }
currentCb = cb; currentCb = cb;
@ -152,10 +154,8 @@ define([
sframeChan.onReady(function () { sframeChan.onReady(function () {
if (ready === true) { return; } if (ready === true) { return; }
if (typeof ready === "function") {
ready();
}
ready = true; ready = true;
_onReadyEvt.fire();
}); });
}); });
}); });

Loading…
Cancel
Save