1
0
mirror of https://github.com/ONLYOFFICE/sdkjs.git synced 2025-04-18 14:24:11 +03:00

[oform] Send complete oform event when saving is actually ended

This commit is contained in:
Ilya Kirillov 2025-04-11 13:41:11 +03:00
parent f357dcde87
commit c00fa8883b

View File

@ -2660,7 +2660,10 @@ background-repeat: no-repeat;\
// Принимаем чужие изменения
var HaveOtherChanges = AscCommon.CollaborativeEditing.Have_OtherChanges();
AscCommon.CollaborativeEditing.Apply_Changes();
// Собираем тут события, которые нужно послать на завершении сохранения
let onSaveEnd = [];
this.CoAuthoringApi.onUnSaveLock = function()
{
t.CoAuthoringApi.onUnSaveLock = null;
@ -2693,6 +2696,8 @@ background-repeat: no-repeat;\
if (t.canUnlockDocument) {
t._unlockDocument();
}
onSaveEnd.forEach(function(f){f();});
};
let cursorInfo = null;
@ -2727,7 +2732,9 @@ background-repeat: no-repeat;\
this.forceSaveOformRequest = false;
AscCommon.CollaborativeEditing.Set_GlobalLock(false);
sendChanges();
this.sendEvent("asc_onCompletePreparingOForm");
onSaveEnd.push(function(){
t.sendEvent("asc_onCompletePreparingOForm");
});
}
else
{
@ -2741,7 +2748,9 @@ background-repeat: no-repeat;\
AscCommon.CollaborativeEditing.Set_GlobalLock(false);
this.setViewModeDisconnect(true);
this.asc_coAuthoringDisconnect();
this.sendEvent("asc_onDisconnectEveryone");
onSaveEnd.push(function(){
t.sendEvent("asc_onDisconnectEveryone");
});
}
};
asc_docs_api.prototype._autoSaveInner = function () {