Merge branch 'staging' into soon

This commit is contained in:
ansuz 2022-03-10 16:51:25 +05:30
commit ecf188d8df
2 changed files with 8 additions and 6 deletions

View file

@ -1804,6 +1804,7 @@ define([
}
if (APP.isDownload) {
delete APP.isDownload;
var bin = getContent();
if (!supportsXLSX()) {
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;
if (blobUrl) {
delete downloadImages[name];
debug("CryptPad Image already loaded " + blobUrl);
return void callback(blobUrl);
}
@ -2556,7 +2558,7 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null
type:'text/javascript',
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 idx = sortCpIndex(hashes);

View file

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