Commit a887d7d8 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Поправил открытие offlineMode

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66612 954022d7-b5bf-4e40-9824-e11837661b57
parent 59d71f81
......@@ -119,6 +119,21 @@ baseEditorsApi.prototype._baseInit = function() {
CHART_STYLE_MANAGER = new CChartStyleManager();
};
baseEditorsApi.prototype._editorNameById = function() {
var res = '';
switch (this.editorId) {
case c_oEditorId.Word:
res = 'Word';
break;
case c_oEditorId.Spreadsheet:
res = 'Excel';
break;
case c_oEditorId.Presentation:
res = 'PowerPoint';
break;
}
return res;
};
baseEditorsApi.prototype.asc_GetFontThumbnailsPath = function() {
return '../Common/Images/';
};
......@@ -228,7 +243,7 @@ baseEditorsApi.prototype.asc_LoadDocument = function(isVersionHistory) {
if (offlineMode === this.documentUrl) {
// ToDo убрать зависимость от this.FontLoader.fontFilesPath
this.documentUrl = this.FontLoader.fontFilesPath + "../Excel/document/"; // поменять!
this.documentUrl = this.FontLoader.fontFilesPath + '../' + this._editorNameById() + '/document/';
this.DocInfo.asc_putOfflineApp(true);
this._OfflineAppDocumentStartLoad();
} else {
......
......@@ -497,35 +497,7 @@ asc_docs_api.prototype.Init = function() {
asc_docs_api.prototype.asc_setLocale = function(val) {
};
asc_docs_api.prototype.LoadDocument = function() {
this.CoAuthoringApi.auth(this.isViewMode);
// Меняем тип состояния (на открытие)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.Open;
if (offlineMode !== this.documentUrl) {
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
var rData = {
"id": this.documentId,
"userid": this.documentUserId,
"format": this.documentFormat,
"vkey": this.documentVKey,
"editorid": this.editorId,
"c": "open",
"url": this.documentUrl,
"title": this.documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts,
"viewmode": this.isViewMode
};
sendCommand2(this, null, rData);
} else {
// ToDo убрать зависимость от this.FontLoader.fontFilesPath
this.documentUrl = this.FontLoader.fontFilesPath + "../PowerPoint/document/";
this.DocInfo.put_OfflineApp(true);
this._OfflineAppDocumentStartLoad();
}
this.sync_zoomChangeCallback(this.WordControl.m_nZoomValue, this.WordControl.m_nZoomType);
this.asc_LoadDocument();
};
asc_docs_api.prototype.SetThemesPath = function(path)
......
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