Commit 595f5833 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил состояние сохранения.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@63200 954022d7-b5bf-4e40-9824-e11837661b57
parent c78f3753
...@@ -2283,7 +2283,9 @@ asc_docs_api.prototype.asc_Print = function() ...@@ -2283,7 +2283,9 @@ asc_docs_api.prototype.asc_Print = function()
"vkey": documentVKey, "vkey": documentVKey,
"format": documentFormat, "format": documentFormat,
"c":"savefromorigin"}; "c":"savefromorigin"};
// Меняем тип состояния (на сохранение)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.Save;
sendCommand2(function(incomeObject){ sendCommand2(function(incomeObject){
if(null != incomeObject && "save" == incomeObject["type"]) if(null != incomeObject && "save" == incomeObject["type"])
editor.processSavedFile(incomeObject["data"], false); editor.processSavedFile(incomeObject["data"], false);
...@@ -2293,19 +2295,25 @@ asc_docs_api.prototype.asc_Print = function() ...@@ -2293,19 +2295,25 @@ asc_docs_api.prototype.asc_Print = function()
else else
editor.asc_fireCallback("asc_onError", c_oAscError.ID.Unknown, c_oAscError.Level.NoCritical); editor.asc_fireCallback("asc_onError", c_oAscError.ID.Unknown, c_oAscError.Level.NoCritical);
} }
// Меняем тип состояния (на никакое)
editor.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Print);}, _sendCommandCallback, rData); editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Print);}, _sendCommandCallback, rData);
} }
else else {
_downloadAs(this, "save", null, null, c_oAscFileType.PDF, function(incomeObject){ // Меняем тип состояния (на сохранение)
if(null != incomeObject && "save" == incomeObject["type"]) this.advancedOptionsAction = c_oAscAdvancedOptionsAction.Save;
editor.processSavedFile(incomeObject["data"], false); _downloadAs(this, "save", null, null, c_oAscFileType.PDF, function (incomeObject) {
else{ if (null != incomeObject && "save" == incomeObject["type"])
if(null != incomeObject && "err" == incomeObject["type"]) editor.processSavedFile(incomeObject["data"], false); else {
editor.asc_fireCallback("asc_onError", g_fMapAscServerErrorToAscError(parseInt(incomeObject["data"])), c_oAscError.Level.NoCritical); if (null != incomeObject && "err" == incomeObject["type"])
else editor.asc_fireCallback("asc_onError", g_fMapAscServerErrorToAscError(parseInt(incomeObject["data"])), c_oAscError.Level.NoCritical); else
editor.asc_fireCallback("asc_onError", c_oAscError.ID.Unknown, c_oAscError.Level.NoCritical); editor.asc_fireCallback("asc_onError", c_oAscError.ID.Unknown, c_oAscError.Level.NoCritical);
} }
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Print);}); // Меняем тип состояния (на никакое)
editor.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
editor.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Print);
});
}
} }
}; };
asc_docs_api.prototype.Undo = function() asc_docs_api.prototype.Undo = function()
...@@ -2461,6 +2469,8 @@ asc_docs_api.prototype.asc_DownloadAs = function(typeFile) {//передаем ...@@ -2461,6 +2469,8 @@ asc_docs_api.prototype.asc_DownloadAs = function(typeFile) {//передаем
var actionType = this.mailMergeFileData ? c_oAscAsyncAction.MailMergeLoadFile : c_oAscAsyncAction.DownloadAs; var actionType = this.mailMergeFileData ? c_oAscAsyncAction.MailMergeLoadFile : c_oAscAsyncAction.DownloadAs;
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, actionType); this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, actionType);
var t = this; var t = this;
// Меняем тип состояния (на сохранение)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.Save;
_downloadAs(this, "save", null, null, typeFile, function (incomeObject) { _downloadAs(this, "save", null, null, typeFile, function (incomeObject) {
if (null != incomeObject && "save" == incomeObject["type"]) if (null != incomeObject && "save" == incomeObject["type"])
t.processSavedFile(incomeObject["data"], false); t.processSavedFile(incomeObject["data"], false);
...@@ -2470,6 +2480,8 @@ asc_docs_api.prototype.asc_DownloadAs = function(typeFile) {//передаем ...@@ -2470,6 +2480,8 @@ asc_docs_api.prototype.asc_DownloadAs = function(typeFile) {//передаем
else else
t.asc_fireCallback("asc_onError", c_oAscError.ID.Unknown, c_oAscError.Level.NoCritical); t.asc_fireCallback("asc_onError", c_oAscError.ID.Unknown, c_oAscError.Level.NoCritical);
} }
// Меняем тип состояния (на никакое)
t.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, actionType); t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, actionType);
}); });
}; };
...@@ -2480,6 +2492,8 @@ asc_docs_api.prototype.asc_DownloadAsMailMerge = function(typeFile, StartIndex, ...@@ -2480,6 +2492,8 @@ asc_docs_api.prototype.asc_DownloadAsMailMerge = function(typeFile, StartIndex,
if(bIsDownload) if(bIsDownload)
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, actionType); this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, actionType);
var t = this; var t = this;
// Меняем тип состояния (на сохранение)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.Save;
_downloadAs(this, "save", oDocumentMailMerge, null, typeFile, function (incomeObject) { _downloadAs(this, "save", oDocumentMailMerge, null, typeFile, function (incomeObject) {
if(bIsDownload){ if(bIsDownload){
if (null != incomeObject && "save" == incomeObject["type"]) if (null != incomeObject && "save" == incomeObject["type"])
...@@ -2494,6 +2508,8 @@ asc_docs_api.prototype.asc_DownloadAsMailMerge = function(typeFile, StartIndex, ...@@ -2494,6 +2508,8 @@ asc_docs_api.prototype.asc_DownloadAsMailMerge = function(typeFile, StartIndex,
else else
t.asc_fireCallback("asc_onError", c_oAscError.ID.MailMergeSaveFile, c_oAscError.Level.NoCritical); t.asc_fireCallback("asc_onError", c_oAscError.ID.MailMergeSaveFile, c_oAscError.Level.NoCritical);
} }
// Меняем тип состояния (на никакое)
t.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
}); });
} }
return null != oDocumentMailMerge ? true : false; return null != oDocumentMailMerge ? true : false;
......
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