Commit c1bb7b85 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

В ответ на комаду "info" добавлен параметр options, который приходит из api.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56252 954022d7-b5bf-4e40-9824-e11837661b57
parent bf997f67
......@@ -66,6 +66,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.documentFormatSaveCsvDelimiter = c_oAscCsvDelimiter.Comma;
this.chartEditor = undefined;
this.documentOpenOptions = undefined; // Опции при открытии (пока только опции для CSV)
this.documentOptions = null;
this.DocInfo = null;
// объекты, нужные для отправки в тулбар (шрифты, стили)
......@@ -431,7 +432,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.documentVKey = this.DocInfo["VKey"];
this.chartEditor = this.DocInfo["ChartEditor"];
this.documentOpenOptions = this.DocInfo["Options"];
if(null != this.documentOpenOptions)
this.documentOptions = JSON.stringify(this.documentOpenOptions);
if(this.documentFormat)
{
switch(this.documentFormat)
......@@ -749,7 +751,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
"title": this.documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts,
"delimiter": option.asc_getDelimiter(),
"codepage": option.asc_getCodePage()};
"codepage": option.asc_getCodePage(),
"options": this.documentOptions};
this._asc_sendCommand(function (response) {t._startOpenDocument(response);}, v);
} else if (this.advancedOptionsAction === c_oAscAdvancedOptionsAction.Save)
......@@ -1014,7 +1017,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
"editorid" : c_oEditorId.Speadsheet,
"url" : this.documentUrl,
"title" : this.documentTitle,
"embeddedfonts" : this.isUseEmbeddedCutFonts
"embeddedfonts" : this.isUseEmbeddedCutFonts,
"options" : this.documentOptions
};
if (this.documentOpenOptions && this.documentOpenOptions["isEmpty"]) {
var sEmptyWorkbook = getEmptyWorkbook();
......
......@@ -11,6 +11,7 @@ var documentFormat = 'null';
var documentVKey = null;
var documentOrigin = "";
var documentFormatSave = c_oAscFileType.PPTX;//пока не во что другое сохранять не можем.
var documentOptions = null;
var c_oSerFormat =
{
......@@ -816,7 +817,9 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
documentUrl = this.DocInfo.get_Url();
documentTitle = this.DocInfo.get_Title();
documentFormat = this.DocInfo.get_Format();
var options = this.DocInfo.get_Options();
if(null != options)
documentOptions = JSON.stringify(options);
var nIndex = -1;
if(documentTitle)
nIndex = documentTitle.lastIndexOf(".");
......@@ -862,7 +865,8 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
"c":"open",
"url": documentUrl,
"title": documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts};
"embeddedfonts": this.isUseEmbeddedCutFonts,
"options": documentOptions};
sendCommand( oThis, function(){}, rData );
......
......@@ -13,6 +13,7 @@ var documentVKey = null;
var documentOrigin = "";
var documentFormatSave = c_oAscFileType.DOCX;
var documentFormatSaveTxtCodepage = 65001;//utf8
var documentOptions = null;
function CDocOpenProgress()
{
......@@ -926,6 +927,9 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
documentUrl = this.DocInfo.get_Url();
documentTitle = this.DocInfo.get_Title();
documentFormat = this.DocInfo.get_Format();
var options = this.DocInfo.get_Options();
if(null != options)
documentOptions = JSON.stringify(options);
if(documentFormat)
{
switch(documentFormat)
......@@ -992,7 +996,8 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
"url": documentUrl,
"title": documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts,
"data": g_sEmpty_bin};
"data": g_sEmpty_bin,
"options": documentOptions};
sendCommand( oThis, function(){}, rData );
editor.OpenDocument2(g_sResourceServiceLocalUrl + documentId + "/", g_sEmpty_bin);
......@@ -1015,7 +1020,8 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
"c": "open",
"url": documentUrl,
"title": documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts};
"embeddedfonts": this.isUseEmbeddedCutFonts,
"options": documentOptions};
sendCommand( oThis, function(){}, rData );
}
......@@ -7123,7 +7129,8 @@ function sendCommand(editor, fCallback, rdata){
"url": documentUrl,
"title": documentTitle,
"codepage": documentFormatSaveTxtCodepage,
"embeddedfonts": editor.isUseEmbeddedCutFonts};
"embeddedfonts": editor.isUseEmbeddedCutFonts,
"options": documentOptions};
sendCommand(editor, fCallback, rData)
break;
......
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