|
|
@ -1,5 +1,5 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright (C) Ascensio System SIA 2012-2019. All rights reserved
|
|
|
|
* Copyright (C) Ascensio System SIA 2012-2020. All rights reserved
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* https://www.onlyoffice.com/
|
|
|
|
* https://www.onlyoffice.com/
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -204459,7 +204459,7 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
|
|
|
|
|
|
|
|
this.bIsLoadDocumentFirst = false;
|
|
|
|
this.bIsLoadDocumentFirst = false;
|
|
|
|
|
|
|
|
|
|
|
|
this.bIsAsyncLoadDocumentImages = false;
|
|
|
|
this.bIsAsyncLoadDocumentImages = true;
|
|
|
|
|
|
|
|
|
|
|
|
this.bIsLoadDocumentImagesNoByOrder = true;
|
|
|
|
this.bIsLoadDocumentImagesNoByOrder = true;
|
|
|
|
this.nNoByOrderCounter = 0;
|
|
|
|
this.nNoByOrderCounter = 0;
|
|
|
@ -204521,6 +204521,14 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.LoadDocumentImagesCallback = function() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.ThemeLoader == null)
|
|
|
|
|
|
|
|
this.Api.asyncImagesDocumentEndLoaded();
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
this.ThemeLoader.asyncImagesEndLoaded();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.LoadDocumentImages = function(_images, isUrl)
|
|
|
|
this.LoadDocumentImages = function(_images, isUrl)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// сначала заполним массив
|
|
|
|
// сначала заполним массив
|
|
|
@ -204548,13 +204556,10 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.LoadImageAsync(i);
|
|
|
|
this.LoadImageAsync(i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.images_loading.splice(0, _len);
|
|
|
|
this.images_loading.splice(0, _len);
|
|
|
|
|
|
|
|
|
|
|
|
if (this.ThemeLoader == null)
|
|
|
|
var that = this;
|
|
|
|
this.Api.asyncImagesDocumentEndLoaded();
|
|
|
|
setTimeout(function() { that.LoadDocumentImagesCallback() }, 3000);
|
|
|
|
else
|
|
|
|
|
|
|
|
this.ThemeLoader.asyncImagesEndLoaded();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
@ -204678,17 +204683,27 @@ function DecodeBase64(imData, szSrc)
|
|
|
|
oImage.Status = ImageLoadStatus.Loading;
|
|
|
|
oImage.Status = ImageLoadStatus.Loading;
|
|
|
|
oImage.Image = new Image();
|
|
|
|
oImage.Image = new Image();
|
|
|
|
oThis.map_image_index[oImage.src] = oImage;
|
|
|
|
oThis.map_image_index[oImage.src] = oImage;
|
|
|
|
|
|
|
|
var oThat = oThis;
|
|
|
|
oImage.Image.onload = function(){
|
|
|
|
oImage.Image.onload = function(){
|
|
|
|
oImage.Status = ImageLoadStatus.Complete;
|
|
|
|
oImage.Status = ImageLoadStatus.Complete;
|
|
|
|
oThis.Api.asyncImageEndLoadedBackground(oImage);
|
|
|
|
oThat.Api.asyncImageEndLoadedBackground(oImage);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
oImage.Image.onerror = function(){
|
|
|
|
oImage.Image.onerror = function(){
|
|
|
|
oImage.Status = ImageLoadStatus.Complete;
|
|
|
|
oImage.Status = ImageLoadStatus.Complete;
|
|
|
|
oImage.Image = null;
|
|
|
|
oImage.Image = null;
|
|
|
|
oThis.Api.asyncImageEndLoadedBackground(oImage);
|
|
|
|
oThat.Api.asyncImageEndLoadedBackground(oImage);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
//oImage.Image.crossOrigin = 'anonymous';
|
|
|
|
//oImage.Image.crossOrigin = 'anonymous';
|
|
|
|
oThis.loadImageByUrl(oImage.Image, oImage.src);
|
|
|
|
|
|
|
|
|
|
|
|
// 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) {
|
|
|
|
|
|
|
|
oThis.loadImageByUrl(oImage.Image, url);
|
|
|
|
|
|
|
|
oThis.map_image_index[url] = oImage;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
oThis.loadImageByUrl(oImage.Image, oImage.src);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
this.LoadImagesWithCallback = function(arr, loadImageCallBack, loadImageCallBackArgs)
|
|
|
|
this.LoadImagesWithCallback = function(arr, loadImageCallBack, loadImageCallBackArgs)
|
|
|
@ -205439,7 +205454,16 @@ CCollaborativeEditingBase.prototype.Clear_NewImages = function()
|
|
|
|
};
|
|
|
|
};
|
|
|
|
CCollaborativeEditingBase.prototype.Add_NewImage = function(Url)
|
|
|
|
CCollaborativeEditingBase.prototype.Add_NewImage = function(Url)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.m_aNewImages.push( Url );
|
|
|
|
// CryptPad - Modify URL for local loading
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
if (Url.indexOf("#src=")!=-1) {
|
|
|
|
|
|
|
|
window.parent.APP.getImageURL(Url, function(url) {
|
|
|
|
|
|
|
|
that.m_aNewImages.push( Url );
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
this.m_aNewImages.push( Url );
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
// CryptPad - End modification
|
|
|
|
};
|
|
|
|
};
|
|
|
|
//-----------------------------------------------------------------------------------
|
|
|
|
//-----------------------------------------------------------------------------------
|
|
|
|
// Функции для работы с массивом m_aDC
|
|
|
|
// Функции для работы с массивом m_aDC
|
|
|
|