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:
parent
f357dcde87
commit
c00fa8883b
15
word/api.js
15
word/api.js
@ -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 () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user