|
|
|
@ -204531,6 +204531,11 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
|
|
|
|
|
this.LoadDocumentImages = function(_images, isUrl)
|
|
|
|
|
{
|
|
|
|
|
// CryptPad added logging
|
|
|
|
|
console.log("Loading images");
|
|
|
|
|
console.log(_images);
|
|
|
|
|
// CryptPad end logging
|
|
|
|
|
|
|
|
|
|
// сначала заполним массив
|
|
|
|
|
if (this.ThemeLoader == null)
|
|
|
|
|
this.Api.asyncImagesDocumentStartLoaded();
|
|
|
|
@ -204694,16 +204699,18 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
oThat.Api.asyncImageEndLoadedBackground(oImage);
|
|
|
|
|
};
|
|
|
|
|
//oImage.Image.crossOrigin = 'anonymous';
|
|
|
|
|
|
|
|
|
|
console.log("Loading image " + i);
|
|
|
|
|
console.log(oImage);
|
|
|
|
|
// CRYPTPAD: if we find an image URL with #channel= in it
|
|
|
|
|
// then we need to ask cryptpad to get the blob
|
|
|
|
|
if (oImage.src.indexOf("#src=")!=-1)
|
|
|
|
|
window.parent.APP.getImageURL(oImage.src, function(url) {
|
|
|
|
|
if (oImage.src.indexOf("#src=")!=-1) {
|
|
|
|
|
window.parent.APP.getImageURL(oImage.src, function(url) {
|
|
|
|
|
oThis.loadImageByUrl(oImage.Image, url);
|
|
|
|
|
oThis.map_image_index[url] = oImage;
|
|
|
|
|
});
|
|
|
|
|
else
|
|
|
|
|
oThis.loadImageByUrl(oImage.Image, oImage.src);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
oThis.loadImageByUrl(oImage.Image, oImage.src);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
this.LoadImagesWithCallback = function(arr, loadImageCallBack, loadImageCallBackArgs)
|
|
|
|
@ -205226,6 +205233,11 @@ CCollaborativeEditingBase.prototype.SendImagesUrlsFromChanges = function (aImage
|
|
|
|
|
if(false === oApi.isSaveFonts_Images){
|
|
|
|
|
oApi.isSaveFonts_Images = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// CryptPad - bypassing image loading which is breaking
|
|
|
|
|
AscCommon.CollaborativeEditing.SendImagesCallback(aImagesToLoad);
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
oApi.fCurCallback = function (oRes) {
|
|
|
|
|
var aData, i, oUrls;
|
|
|
|
|
if(oRes['status'] === 'ok')
|
|
|
|
@ -205241,6 +205253,7 @@ CCollaborativeEditingBase.prototype.SendImagesUrlsFromChanges = function (aImage
|
|
|
|
|
AscCommon.CollaborativeEditing.SendImagesCallback(aImagesToLoad);
|
|
|
|
|
};
|
|
|
|
|
AscCommon.sendCommand(oApi, null, rData);
|
|
|
|
|
*/
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
CCollaborativeEditingBase.prototype.SendImagesCallback = function (aImages) {
|
|
|
|
@ -205454,15 +205467,16 @@ CCollaborativeEditingBase.prototype.Clear_NewImages = function()
|
|
|
|
|
};
|
|
|
|
|
CCollaborativeEditingBase.prototype.Add_NewImage = function(Url)
|
|
|
|
|
{
|
|
|
|
|
this.m_aNewImages.push( Url );
|
|
|
|
|
// CryptPad - Modify URL for local loading
|
|
|
|
|
var that = this;
|
|
|
|
|
/*
|
|
|
|
|
console.log("Add Image " + Url);
|
|
|
|
|
if (Url.indexOf("#src=")!=-1) {
|
|
|
|
|
window.parent.APP.getImageURL(Url, function(url) {
|
|
|
|
|
that.m_aNewImages.push( Url );
|
|
|
|
|
console.log("CryptPad Image " + url);
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
this.m_aNewImages.push( Url );
|
|
|
|
|
}
|
|
|
|
|
*/
|
|
|
|
|
// CryptPad - End modification
|
|
|
|
|
};
|
|
|
|
|
//-----------------------------------------------------------------------------------
|
|
|
|
|