Commit 633ce5c1 authored by Boris Kocherov's avatar Boris Kocherov

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

parent 4d392b27
...@@ -500,7 +500,7 @@ DocsAPI.DocEditor.version = function () { ...@@ -500,7 +500,7 @@ DocsAPI.DocEditor.version = function () {
g.props.save_defer.resolve(); g.props.save_defer.resolve();
g.props.save_defer = null; g.props.save_defer = null;
} else { } else {
g.triggerSubmit(); return g.triggerSubmit();
} }
}); });
}) })
...@@ -562,4 +562,4 @@ DocsAPI.DocEditor.version = function () { ...@@ -562,4 +562,4 @@ DocsAPI.DocEditor.version = function () {
return g.notifyChange(); return g.notifyChange();
} }
}); });
}(rJS, RSVP, require, jIO)); }(rJS, RSVP, require, jIO));
\ No newline at end of file
...@@ -1367,6 +1367,7 @@ var editor; ...@@ -1367,6 +1367,7 @@ var editor;
this.CoAuthoringApi.saveChanges(arrChanges, deleteIndex, excelAdditionalInfo, this.canUnlockDocument2); this.CoAuthoringApi.saveChanges(arrChanges, deleteIndex, excelAdditionalInfo, this.canUnlockDocument2);
History.CanNotAddChanges = true; History.CanNotAddChanges = true;
} else { } else {
this.CoAuthoringApi.onUnSaveLock();
this.CoAuthoringApi.unLockDocument(true, this.canUnlockDocument2); this.CoAuthoringApi.unLockDocument(true, this.canUnlockDocument2);
} }
this.canUnlockDocument2 = false; this.canUnlockDocument2 = false;
......
...@@ -716,7 +716,7 @@ define([ ...@@ -716,7 +716,7 @@ define([
Common.Gateway.on('processrightschange', _.bind(me.onProcessRightsChange, me)); Common.Gateway.on('processrightschange', _.bind(me.onProcessRightsChange, me));
Common.Gateway.on('processmouse', _.bind(me.onProcessMouse, me)); Common.Gateway.on('processmouse', _.bind(me.onProcessMouse, me));
Common.Gateway.on('save', function () { Common.Gateway.on('save', function () {
if (me.api.asc_isDocumentModified()) { if (me.api.asc_isDocumentModified() && me.api.asc_isDocumentCanSave()) {
me.api.asc_Save(); me.api.asc_Save();
return true; 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