Commit 4d2855f2 authored by Boris Kocherov's avatar Boris Kocherov Committed by Romain Courteaud

[erp5_only_office] fix double save on press savebtn, and remove infinte savelock

parent eb7e14f2
......@@ -500,7 +500,7 @@ DocsAPI.DocEditor.version = function () {
g.props.save_defer.resolve();
g.props.save_defer = null;
} else {
g.triggerSubmit();
return g.triggerSubmit();
}
});
})
......@@ -562,4 +562,4 @@ DocsAPI.DocEditor.version = function () {
return g.notifyChange();
}
});
}(rJS, RSVP, require, jIO));
\ No newline at end of file
}(rJS, RSVP, require, jIO));
......@@ -1367,6 +1367,7 @@ var editor;
this.CoAuthoringApi.saveChanges(arrChanges, deleteIndex, excelAdditionalInfo, this.canUnlockDocument2);
History.CanNotAddChanges = true;
} else {
this.CoAuthoringApi.onUnSaveLock();
this.CoAuthoringApi.unLockDocument(true, this.canUnlockDocument2);
}
this.canUnlockDocument2 = false;
......
......@@ -716,7 +716,7 @@ define([
Common.Gateway.on('processrightschange', _.bind(me.onProcessRightsChange, me));
Common.Gateway.on('processmouse', _.bind(me.onProcessMouse, me));
Common.Gateway.on('save', function () {
if (me.api.asc_isDocumentModified()) {
if (me.api.asc_isDocumentModified() && me.api.asc_isDocumentCanSave()) {
me.api.asc_Save();
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment