Fixes in onlyoffice code for image upload realtime and ooslide
This commit is contained in:
16
www/common/onlyoffice/sdkjs/word/sdk-all-min.js
vendored
16
www/common/onlyoffice/sdkjs/word/sdk-all-min.js
vendored
@@ -21308,6 +21308,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')
|
||||
@@ -21323,6 +21328,7 @@ CCollaborativeEditingBase.prototype.SendImagesUrlsFromChanges = function (aImage
|
||||
AscCommon.CollaborativeEditing.SendImagesCallback(aImagesToLoad);
|
||||
};
|
||||
AscCommon.sendCommand(oApi, null, rData);
|
||||
*/
|
||||
};
|
||||
|
||||
CCollaborativeEditingBase.prototype.SendImagesCallback = function (aImages) {
|
||||
@@ -21536,15 +21542,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
|
||||
};
|
||||
//-----------------------------------------------------------------------------------
|
||||
@@ -24352,6 +24359,7 @@ function (window, undefined)
|
||||
// This method calls back to the cryptpad onlyoffice inner.js to load the cryptad file dialog
|
||||
window.parent.APP.AddImage(function(res) {
|
||||
// This method adds the loaded image to the list of loaded images
|
||||
console.log("AddImageCallback");
|
||||
t.asc_addImageCallback(res);
|
||||
// This method activats the image
|
||||
t._addImageUrl([res.url]);
|
||||
|
||||
Reference in New Issue
Block a user