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

ошибка при сохранении

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67539 954022d7-b5bf-4e40-9824-e11837661b57
parent 8d5b8a1f
...@@ -206,16 +206,19 @@ window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs) ...@@ -206,16 +206,19 @@ window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs)
window["AscDesktopEditor"]["LocalFileSave"](_param); window["AscDesktopEditor"]["LocalFileSave"](_param);
}; };
window["DesktopOfflineAppDocumentEndSave"] = function(isCancel) window["DesktopOfflineAppDocumentEndSave"] = function(error)
{ {
window["Asc"]["editor"].sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save); window["Asc"]["editor"].sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save);
if (isCancel !== true) if (0 == error)
DesktopOfflineUpdateLocalName(window["Asc"]["editor"]); DesktopOfflineUpdateLocalName(window["Asc"]["editor"]);
else else
History.UserSavedIndex = window["Asc"]["editor"].LastUserSavedIndex; History.UserSavedIndex = window["Asc"]["editor"].LastUserSavedIndex;
window["Asc"]["editor"].onUpdateDocumentModified(History.Is_Modified()); window["Asc"]["editor"].onUpdateDocumentModified(History.Is_Modified());
window["Asc"]["editor"].LastUserSavedIndex = undefined; window["Asc"]["editor"].LastUserSavedIndex = undefined;
if (2 == error)
window["Asc"]["editor"].sendEvent("asc_onError", c_oAscError.ID.ConvertationError, c_oAscError.Level.NoCritical);
}; };
window["Asc"]['spreadsheet_api'].prototype["asc_addImageDrawingObject"] = window["Asc"]['spreadsheet_api'].prototype.asc_addImageDrawingObject; window["Asc"]['spreadsheet_api'].prototype["asc_addImageDrawingObject"] = window["Asc"]['spreadsheet_api'].prototype.asc_addImageDrawingObject;
......
...@@ -148,16 +148,19 @@ window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs) ...@@ -148,16 +148,19 @@ window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs)
window["AscDesktopEditor"]["LocalFileSave"](_param); window["AscDesktopEditor"]["LocalFileSave"](_param);
}; };
window["DesktopOfflineAppDocumentEndSave"] = function(isCancel) window["DesktopOfflineAppDocumentEndSave"] = function(error)
{ {
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save); editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save);
if (isCancel !== true) if (0 == error)
DesktopOfflineUpdateLocalName(editor); DesktopOfflineUpdateLocalName(editor);
else else
History.UserSavedIndex = editor.LastUserSavedIndex; History.UserSavedIndex = editor.LastUserSavedIndex;
editor.UpdateInterfaceState(); editor.UpdateInterfaceState();
editor.LastUserSavedIndex = undefined; editor.LastUserSavedIndex = undefined;
if (2 == error)
editor.sendEvent("asc_onError", c_oAscError.ID.ConvertationError, c_oAscError.Level.Critical);
}; };
asc_docs_api.prototype.asc_DownloadAs = function(typeFile, bIsDownloadEvent) asc_docs_api.prototype.asc_DownloadAs = function(typeFile, bIsDownloadEvent)
{ {
......
...@@ -172,16 +172,19 @@ window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs) ...@@ -172,16 +172,19 @@ window["DesktopOfflineAppDocumentStartSave"] = function(isSaveAs)
window["AscDesktopEditor"]["LocalFileSave"](_param); window["AscDesktopEditor"]["LocalFileSave"](_param);
}; };
window["DesktopOfflineAppDocumentEndSave"] = function(isCancel) window["DesktopOfflineAppDocumentEndSave"] = function(error)
{ {
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save); editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Save);
if (isCancel !== true) if (error == 0)
DesktopOfflineUpdateLocalName(editor); DesktopOfflineUpdateLocalName(editor);
else else
History.UserSavedIndex = editor.LastUserSavedIndex; History.UserSavedIndex = editor.LastUserSavedIndex;
editor.UpdateInterfaceState(); editor.UpdateInterfaceState();
editor.LastUserSavedIndex = undefined; editor.LastUserSavedIndex = undefined;
if (2 == error)
editor.sendEvent("asc_onError", c_oAscError.ID.ConvertationError, c_oAscError.Level.NoCritical);
}; };
asc_docs_api.prototype.asc_DownloadAs = function(typeFile, bIsDownloadEvent) asc_docs_api.prototype.asc_DownloadAs = function(typeFile, bIsDownloadEvent)
{ {
......
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