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

add asc_setLocale, который влияет на новый документ.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52686 954022d7-b5bf-4e40-9824-e11837661b57
parent 0f817cb5
......@@ -412,6 +412,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
if(c_DocInfo)
this.DocInfo = c_DocInfo;
},
asc_setLocale: function (val) {
},
asc_LoadDocument: function (c_DocInfo) {
var t = this;
......@@ -3289,6 +3291,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
prot["asc_Init"] = prot.asc_Init;
prot["asc_setDocInfo"] = prot.asc_setDocInfo;
prot["asc_setLocale"] = prot.asc_setLocale;
prot["asc_getEditorPermissions"] = prot.asc_getEditorPermissions;
prot["asc_LoadDocument"] = prot.asc_LoadDocument;
prot["asc_LoadEmptyDocument"] = prot.asc_LoadEmptyDocument;
......
......@@ -32,6 +32,7 @@ prop:Init
prop:asc_getEditorPermissions
prop:asc_getEditorPermissionsCallback
prop:asc_setDocInfo
prop:asc_setLocale
prop:LoadDocument
prop:SetFontsPath
prop:SetThemesPath
......@@ -1171,6 +1172,7 @@ asc_docs_api.prototype['Init'] = asc_docs_api.prototype.Init;
asc_docs_api.prototype['asc_getEditorPermissions'] = asc_docs_api.prototype.asc_getEditorPermissions;
asc_docs_api.prototype['asc_getEditorPermissionsCallback'] = asc_docs_api.prototype.asc_getEditorPermissionsCallback;
asc_docs_api.prototype['asc_setDocInfo'] = asc_docs_api.prototype.asc_setDocInfo;
asc_docs_api.prototype['asc_setLocale'] = asc_docs_api.prototype.asc_setLocale;
asc_docs_api.prototype['LoadDocument'] = asc_docs_api.prototype.LoadDocument;
asc_docs_api.prototype['SetFontsPath'] = asc_docs_api.prototype.SetFontsPath;
asc_docs_api.prototype['SetThemesPath'] = asc_docs_api.prototype.SetThemesPath;
......
......@@ -759,6 +759,9 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo)
if(c_DocInfo)
this.DocInfo = c_DocInfo;
}
asc_docs_api.prototype.asc_setLocale = function(val)
{
}
asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
{
......
......@@ -178,6 +178,7 @@ prop:Init
prop:asc_getEditorPermissions
prop:asc_getEditorPermissionsCallback
prop:asc_setDocInfo
prop:asc_setLocale
prop:LoadDocument
prop:SetFontsPath
prop:SetTextBoxInputMode
......@@ -1258,6 +1259,7 @@ asc_docs_api.prototype['Init'] = asc_docs_api.prototype.Init;
asc_docs_api.prototype['asc_getEditorPermissions'] = asc_docs_api.prototype.asc_getEditorPermissions;
asc_docs_api.prototype['asc_getEditorPermissionsCallback'] = asc_docs_api.prototype.asc_getEditorPermissionsCallback;
asc_docs_api.prototype['asc_setDocInfo'] = asc_docs_api.prototype.asc_setDocInfo;
asc_docs_api.prototype['asc_setLocale'] = asc_docs_api.prototype.asc_setLocale;
asc_docs_api.prototype['LoadDocument'] = asc_docs_api.prototype.LoadDocument;
asc_docs_api.prototype['SetFontsPath'] = asc_docs_api.prototype.SetFontsPath;
asc_docs_api.prototype['SetTextBoxInputMode'] = asc_docs_api.prototype.SetTextBoxInputMode;
......
......@@ -526,6 +526,7 @@ function asc_docs_api(name)
this.DocumentUrl = "";
this.DocumentName = "";
this.DocInfo = null;
this.InterfaceLocale = null;
this.ShowParaMarks = false;
this.isAddSpaceBetweenPrg = false;
......@@ -887,6 +888,10 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo)
if(c_DocInfo)
this.DocInfo = c_DocInfo;
}
asc_docs_api.prototype.asc_setLocale = function(val)
{
this.InterfaceLocale = val;
}
asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
{
......@@ -940,6 +945,12 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
var rData = {"id":documentId, "format": documentFormat, "vkey": documentVKey, "editorid": c_oEditorId.Word, "c":"create", "url": documentUrl, "title": documentTitle, "embeddedfonts": this.isUseEmbeddedCutFonts, "data": g_sEmpty_bin};
sendCommand( oThis, function(){}, rData );
editor.OpenDocument2(g_sResourceServiceLocalUrl + documentId + "/", g_sEmpty_bin);
if(this.InterfaceLocale)
{
var nLocale = g_oLcidNameToIdMap[this.InterfaceLocale];
if(null != nLocale)
this.asc_setDefaultLanguage(nLocale);
}
}
else
{
......
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