Commit 69c154d2 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

saveas CROSSPLATFORM formats

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67480 954022d7-b5bf-4e40-9824-e11837661b57
parent 88b6fe3e
......@@ -199,10 +199,14 @@ window["Asc"]['spreadsheet_api'].prototype.asc_isOffline = function()
window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs)
{
window["Asc"]["editor"].sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save);
var _param = "";
if (isSaveAs === true)
window["AscDesktopEditor"]["LocalFileSave"](true);
else
window["AscDesktopEditor"]["LocalFileSave"]();
_param += "saveas=true;";
if (AscBrowser.isRetina)
_param += "retina=true;";
window["AscDesktopEditor"]["LocalFileSave"](_param);
};
window["DesktopOfflineAppDocumentEndSave"] = function(isCancel)
{
......
......@@ -141,10 +141,14 @@ asc_docs_api.prototype.asc_Save = function (isNoUserSave, isSaveAs)
window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs)
{
editor.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save);
var _param = "";
if (isSaveAs === true)
window["AscDesktopEditor"]["LocalFileSave"](true);
else
window["AscDesktopEditor"]["LocalFileSave"]();
_param += "saveas=true;";
if (AscBrowser.isRetina)
_param += "retina=true;";
window["AscDesktopEditor"]["LocalFileSave"](_param);
};
window["DesktopOfflineAppDocumentEndSave"] = function(isCancel)
{
......
......@@ -145,10 +145,18 @@ asc_docs_api.prototype.asc_Save = function (isNoUserSave, isSaveAs)
{
var _isNaturalSave = this.IsUserSave;
this.canSave = false;
this.CoAuthoringApi.askSaveChanges(OnSave_Callback);
if (this.CoAuthoringApi.onUnSaveLock)
this.CoAuthoringApi.onUnSaveLock();
if (this.WordControl.m_oLogicDocument != null)
{
this.CoAuthoringApi.askSaveChanges(OnSave_Callback);
if (this.CoAuthoringApi.onUnSaveLock)
this.CoAuthoringApi.onUnSaveLock();
}
else
{
this.canSave = true;
}
if (_isNaturalSave === true)
window["DesktopOfflineAppDocumentStartSave"](isSaveAs);
......@@ -157,10 +165,14 @@ asc_docs_api.prototype.asc_Save = function (isNoUserSave, isSaveAs)
window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs)
{
editor.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save);
var _param = "";
if (isSaveAs === true)
window["AscDesktopEditor"]["LocalFileSave"](true);
else
window["AscDesktopEditor"]["LocalFileSave"]();
_param += "saveas=true;";
if (AscBrowser.isRetina)
_param += "retina=true;";
window["AscDesktopEditor"]["LocalFileSave"](_param);
};
window["DesktopOfflineAppDocumentEndSave"] = function(isCancel)
{
......
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