Commit 22cb9663 authored by Boris Kocherov's avatar Boris Kocherov

erp5_officejs_ooffice: fix "unavailable save state" if save button pressed in not modified document

parent f319e070
......@@ -884,7 +884,11 @@ define([
Common.Gateway.on('processrightschange', _.bind(me.onProcessRightsChange, me));
Common.Gateway.on('processmouse', _.bind(me.onProcessMouse, me));
Common.Gateway.on('refreshhistory', _.bind(me.onRefreshHistory, me));
Common.Gateway.on('save', _.bind(me.api.asc_Save, me.api));
Common.Gateway.on('save', function () {
if (me.api.isDocumentModified()) {
me.api.asc_Save();
}
});
Common.Gateway.on('downloadas', _.bind(me.onDownloadAs, me));
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
......
......@@ -218,7 +218,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>953.22698.31985.41369</string> </value>
<value> <string>956.37205.45053.30037</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -236,7 +236,7 @@
</tuple>
<state>
<tuple>
<float>1471734588.18</float>
<float>1486024275.69</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -667,7 +667,11 @@ define([
Common.Gateway.on('processsaveresult', _.bind(me.onProcessSaveResult, me));
Common.Gateway.on('processrightschange', _.bind(me.onProcessRightsChange, me));
Common.Gateway.on('processmouse', _.bind(me.onProcessMouse, me));
Common.Gateway.on('save', _.bind(me.api.asc_Save, me.api));
Common.Gateway.on('save', function () {
if (me.api.isDocumentModified()) {
me.api.asc_Save();
}
});
Common.Gateway.on('downloadas', _.bind(me.onDownloadAs, me));
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
......
......@@ -218,7 +218,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>953.23956.47039.49698</string> </value>
<value> <string>956.37205.45053.30037</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -236,7 +236,7 @@
</tuple>
<state>
<tuple>
<float>1471734696.48</float>
<float>1486024308.4</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -675,7 +675,11 @@ define([
Common.Gateway.on('processsaveresult', _.bind(me.onProcessSaveResult, me));
Common.Gateway.on('processrightschange', _.bind(me.onProcessRightsChange, me));
Common.Gateway.on('processmouse', _.bind(me.onProcessMouse, me));
Common.Gateway.on('save', _.bind(me.api.asc_Save, me.api));
Common.Gateway.on('save', function () {
if (me.api.asc_isDocumentModified()) {
me.api.asc_Save();
}
});
Common.Gateway.on('downloadas', _.bind(me.onDownloadAs, me));
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
......
......@@ -85,6 +85,10 @@
<key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value>
</item>
<item>
<key> <string>revision</string> </key>
<value> <string>1</string> </value>
</item>
<item>
<key> <string>url_string</string> </key>
<value> <string>ooffice/apps/spreadsheeteditor/main/app/controller/Main.js</string> </value>
......@@ -218,7 +222,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>953.20766.57483.9506</string> </value>
<value> <string>957.2604.12251.64682</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -236,7 +240,7 @@
</tuple>
<state>
<tuple>
<float>1471768380.85</float>
<float>1486024251.76</float>
<string>UTC</string>
</tuple>
</state>
......
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