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