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([ ...@@ -884,7 +884,11 @@ 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('refreshhistory', _.bind(me.onRefreshHistory, 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.on('downloadas', _.bind(me.onDownloadAs, me));
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'}); Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
......
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>953.22698.31985.41369</string> </value> <value> <string>956.37205.45053.30037</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1471734588.18</float> <float>1486024275.69</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -667,7 +667,11 @@ define([ ...@@ -667,7 +667,11 @@ define([
Common.Gateway.on('processsaveresult', _.bind(me.onProcessSaveResult, me)); Common.Gateway.on('processsaveresult', _.bind(me.onProcessSaveResult, me));
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', _.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.on('downloadas', _.bind(me.onDownloadAs, me));
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'}); Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
...@@ -1607,4 +1611,4 @@ define([ ...@@ -1607,4 +1611,4 @@ define([
textContactUs: 'Contact sales' textContactUs: 'Contact sales'
} }
})(), PE.Controllers.Main || {})) })(), PE.Controllers.Main || {}))
}); });
\ No newline at end of file
...@@ -218,7 +218,7 @@ ...@@ -218,7 +218,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>953.23956.47039.49698</string> </value> <value> <string>956.37205.45053.30037</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1471734696.48</float> <float>1486024308.4</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -675,7 +675,11 @@ define([ ...@@ -675,7 +675,11 @@ define([
Common.Gateway.on('processsaveresult', _.bind(me.onProcessSaveResult, me)); Common.Gateway.on('processsaveresult', _.bind(me.onProcessSaveResult, me));
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', _.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.on('downloadas', _.bind(me.onDownloadAs, me));
Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'}); Common.Gateway.sendInfo({mode:me.appOptions.isEdit?'edit':'view'});
...@@ -1867,4 +1871,4 @@ define([ ...@@ -1867,4 +1871,4 @@ define([
confirmPutMergeRange: 'The source data contains merged cells.<br>They will be unmerged before they are pasted into the table.' confirmPutMergeRange: 'The source data contains merged cells.<br>They will be unmerged before they are pasted into the table.'
} }
})(), SSE.Controllers.Main || {})) })(), SSE.Controllers.Main || {}))
}); });
\ No newline at end of file
...@@ -85,6 +85,10 @@ ...@@ -85,6 +85,10 @@
<key> <string>portal_type</string> </key> <key> <string>portal_type</string> </key>
<value> <string>Web Script</string> </value> <value> <string>Web Script</string> </value>
</item> </item>
<item>
<key> <string>revision</string> </key>
<value> <string>1</string> </value>
</item>
<item> <item>
<key> <string>url_string</string> </key> <key> <string>url_string</string> </key>
<value> <string>ooffice/apps/spreadsheeteditor/main/app/controller/Main.js</string> </value> <value> <string>ooffice/apps/spreadsheeteditor/main/app/controller/Main.js</string> </value>
...@@ -218,7 +222,7 @@ ...@@ -218,7 +222,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>953.20766.57483.9506</string> </value> <value> <string>957.2604.12251.64682</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -236,7 +240,7 @@ ...@@ -236,7 +240,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1471768380.85</float> <float>1486024251.76</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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