Commit dddab8e8 authored by Sergey.Konovalov's avatar Sergey.Konovalov

add api.asc_DownloadOrigin

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66882 954022d7-b5bf-4e40-9824-e11837661b57
parent b1101995
......@@ -1694,15 +1694,18 @@ asc_docs_api.prototype.asc_Print = function(bIsDownloadEvent)
return;
}
}
this._print(c_oAscAsyncAction.Print, bIsDownloadEvent ? DownloadType.Print: DownloadType.None);
};
asc_docs_api.prototype._print = function(actionType, downloadType) {
var command;
var options = {isNoData: false, downloadType: bIsDownloadEvent ? DownloadType.Print: DownloadType.None};
var options = {isNoData: false, downloadType: downloadType};
if (null == this.WordControl.m_oLogicDocument) {
command = 'savefromorigin';
options.isNoData = true;
} else {
command = 'save';
}
_downloadAs(this, command, c_oAscFileType.PDF, c_oAscAsyncAction.Print, options, null);
_downloadAs(this, command, c_oAscFileType.PDF, actionType, options, null);
};
asc_docs_api.prototype.Undo = function()
{
......@@ -1849,7 +1852,11 @@ asc_docs_api.prototype.asc_Save = function(isAutoSave) {
this.CoAuthoringApi.askSaveChanges(OnSave_Callback);
}
};
asc_docs_api.prototype.asc_DownloadOrigin = function(bIsDownloadEvent) {
//скачивание оригинального pdf, djvu, xps
//todo реализовать не через print
this._print(c_oAscAsyncAction.DownloadAs, bIsDownloadEvent ? DownloadType.Download: DownloadType.None);
};
asc_docs_api.prototype.asc_DownloadAs = function(typeFile, bIsDownloadEvent) {//передаем число соответствующее своему формату.
var actionType = this.mailMergeFileData ? c_oAscAsyncAction.MailMergeLoadFile : c_oAscAsyncAction.DownloadAs;
var options = {downloadType: bIsDownloadEvent ? DownloadType.Download: DownloadType.None};
......
......@@ -150,6 +150,7 @@ asc_docs_api.prototype['Share'] = asc_docs_api.prototype.Share;
asc_docs_api.prototype['asc_Save'] = asc_docs_api.prototype.asc_Save;
asc_docs_api.prototype['asc_DownloadAs'] = asc_docs_api.prototype.asc_DownloadAs;
asc_docs_api.prototype['asc_DownloadAsMailMerge'] = asc_docs_api.prototype.asc_DownloadAsMailMerge;
asc_docs_api.prototype['asc_DownloadOrigin'] = asc_docs_api.prototype.asc_DownloadOrigin;
asc_docs_api.prototype['Resize'] = asc_docs_api.prototype.Resize;
asc_docs_api.prototype['AddURL'] = asc_docs_api.prototype.AddURL;
asc_docs_api.prototype['Help'] = asc_docs_api.prototype.Help;
......
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