Commit 633ce5c1 by Boris Kocherov

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

1 parent 4d392b27
......@@ -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;
}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!