Commit 2f21622c authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

delete DocumentName -> documentTitle

documentTitle to base

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66377 954022d7-b5bf-4e40-9824-e11837661b57
parent 83f87449
...@@ -24,6 +24,7 @@ function baseEditorsApi(name) { ...@@ -24,6 +24,7 @@ function baseEditorsApi(name) {
this.documentUrl = "null"; this.documentUrl = "null";
this.documentUrlChanges = null; this.documentUrlChanges = null;
this.documentCallbackUrl = undefined; // Ссылка для отправления информации о документе this.documentCallbackUrl = undefined; // Ссылка для отправления информации о документе
this.documentTitle = "null";
// Тип состояния на данный момент (сохранение, открытие или никакое) // Тип состояния на данный момент (сохранение, открытие или никакое)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.None; this.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
......
...@@ -42,8 +42,6 @@ var editor; ...@@ -42,8 +42,6 @@ var editor;
this.wb = null; this.wb = null;
this.wbModel = null; this.wbModel = null;
this.DocumentName = "";
this.documentTitle = "null";
this.documentFormat = "null"; this.documentFormat = "null";
this.documentVKey = null; this.documentVKey = null;
this.documentFormatSave = c_oAscFileType.XLSX; this.documentFormatSave = c_oAscFileType.XLSX;
......
...@@ -216,7 +216,7 @@ function DesktopOfflineUpdateLocalName(_api) ...@@ -216,7 +216,7 @@ function DesktopOfflineUpdateLocalName(_api)
if (_ind != 1000000) if (_ind != 1000000)
_name = _name.substring(_ind + 1); _name = _name.substring(_ind + 1);
_api.DocumentName = _name; _api.documentTitle = _name;
window["AscDesktopEditor"]["SetDocumentName"](_name); window["AscDesktopEditor"]["SetDocumentName"](_name);
} }
......
"use strict"; "use strict";
var documentTitle = 'null';
var documentTitleWithoutExtention = 'null'; var documentTitleWithoutExtention = 'null';
var documentFormat = 'null'; var documentFormat = 'null';
var documentVKey = null; var documentVKey = null;
...@@ -34,7 +33,6 @@ function asc_docs_api(name) ...@@ -34,7 +33,6 @@ function asc_docs_api(name)
this.ThemeLoader.Api = this; this.ThemeLoader.Api = this;
this.DocumentUrl = ""; this.DocumentUrl = "";
this.DocumentName = "";
this.bNoSendComments = false; this.bNoSendComments = false;
this.isApplyChangesOnOpen = false; this.isApplyChangesOnOpen = false;
...@@ -645,17 +643,17 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) { ...@@ -645,17 +643,17 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
this.documentId = this.DocInfo.get_Id(); this.documentId = this.DocInfo.get_Id();
this.documentUserId = this.DocInfo.get_UserId(); this.documentUserId = this.DocInfo.get_UserId();
this.documentUrl = this.DocInfo.get_Url(); this.documentUrl = this.DocInfo.get_Url();
documentTitle = this.DocInfo.get_Title(); this.documentTitle = this.DocInfo.get_Title();
documentFormat = this.DocInfo.get_Format(); documentFormat = this.DocInfo.get_Format();
this.documentCallbackUrl = this.DocInfo.get_CallbackUrl(); this.documentCallbackUrl = this.DocInfo.get_CallbackUrl();
var nIndex = -1; var nIndex = -1;
if (documentTitle) { if (this.documentTitle) {
nIndex = documentTitle.lastIndexOf("."); nIndex = this.documentTitle.lastIndexOf(".");
} }
if (-1 != nIndex) { if (-1 != nIndex) {
documentTitleWithoutExtention = documentTitle.substring(0, nIndex); documentTitleWithoutExtention = this.documentTitle.substring(0, nIndex);
} else { } else {
documentTitleWithoutExtention = documentTitle; documentTitleWithoutExtention = this.documentTitle;
} }
documentVKey = this.DocInfo.get_VKey(); documentVKey = this.DocInfo.get_VKey();
...@@ -667,9 +665,8 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) { ...@@ -667,9 +665,8 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
this.User.asc_setUserName(this.DocInfo.get_UserName()); this.User.asc_setUserName(this.DocInfo.get_UserName());
} }
this.DocumentName = documentTitle;
if (undefined !== window["AscDesktopEditor"]) { if (undefined !== window["AscDesktopEditor"]) {
window["AscDesktopEditor"]["SetDocumentName"](this.DocumentName); window["AscDesktopEditor"]["SetDocumentName"](this.documentTitle);
} }
}; };
asc_docs_api.prototype.asc_setLocale = function(val) { asc_docs_api.prototype.asc_setLocale = function(val) {
...@@ -692,7 +689,7 @@ asc_docs_api.prototype.LoadDocument = function() { ...@@ -692,7 +689,7 @@ asc_docs_api.prototype.LoadDocument = function() {
"editorid": c_oEditorId.Presentation, "editorid": c_oEditorId.Presentation,
"c": "open", "c": "open",
"url": this.documentUrl, "url": this.documentUrl,
"title": documentTitle, "title": this.documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts, "embeddedfonts": this.isUseEmbeddedCutFonts,
"viewmode": this.isViewMode "viewmode": this.isViewMode
}; };
...@@ -892,7 +889,7 @@ asc_docs_api.prototype.OpenDocument2 = function(url, gObject) ...@@ -892,7 +889,7 @@ asc_docs_api.prototype.OpenDocument2 = function(url, gObject)
}; };
asc_docs_api.prototype.get_DocumentName = function() asc_docs_api.prototype.get_DocumentName = function()
{ {
return this.DocumentName; return this.documentTitle;
}; };
asc_docs_api.prototype._OfflineAppDocumentStartLoad = function() { asc_docs_api.prototype._OfflineAppDocumentStartLoad = function() {
...@@ -4992,7 +4989,7 @@ function _downloadAs(editor, filetype, actionType, options) ...@@ -4992,7 +4989,7 @@ function _downloadAs(editor, filetype, actionType, options)
oAdditionalData["userid"] = editor.documentUserId; oAdditionalData["userid"] = editor.documentUserId;
oAdditionalData["vkey"] = documentVKey; oAdditionalData["vkey"] = documentVKey;
oAdditionalData["outputformat"] = filetype; oAdditionalData["outputformat"] = filetype;
oAdditionalData["title"] = changeFileExtention(documentTitle, getExtentionByFormat(filetype)); oAdditionalData["title"] = changeFileExtention(editor.documentTitle, getExtentionByFormat(filetype));
oAdditionalData["savetype"] = c_oAscSaveTypes.CompleteAll; oAdditionalData["savetype"] = c_oAscSaveTypes.CompleteAll;
if(c_oAscFileType.PDF == filetype) if(c_oAscFileType.PDF == filetype)
{ {
......
...@@ -222,7 +222,7 @@ function DesktopOfflineUpdateLocalName(_api) ...@@ -222,7 +222,7 @@ function DesktopOfflineUpdateLocalName(_api)
if (_ind != 1000000) if (_ind != 1000000)
_name = _name.substring(_ind + 1); _name = _name.substring(_ind + 1);
_api.DocumentName = _name; _api.documentTitle = _name;
window["AscDesktopEditor"]["SetDocumentName"](_name); window["AscDesktopEditor"]["SetDocumentName"](_name);
} }
......
"use strict"; "use strict";
var documentTitle = 'null';
var documentTitleWithoutExtention = 'null'; var documentTitleWithoutExtention = 'null';
var documentFormat = 'null'; var documentFormat = 'null';
var documentVKey = null; var documentVKey = null;
...@@ -281,7 +280,6 @@ function asc_docs_api(name) ...@@ -281,7 +280,6 @@ function asc_docs_api(name)
//todo убрать из native, copypaste, chart, loadfont //todo убрать из native, copypaste, chart, loadfont
//this.DocumentUrl = ""; //this.DocumentUrl = "";
this.DocumentName = "";
this.InterfaceLocale = null; this.InterfaceLocale = null;
this.ShowParaMarks = false; this.ShowParaMarks = false;
...@@ -576,17 +574,17 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) { ...@@ -576,17 +574,17 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
this.documentId = this.DocInfo.get_Id(); this.documentId = this.DocInfo.get_Id();
this.documentUserId = this.DocInfo.get_UserId(); this.documentUserId = this.DocInfo.get_UserId();
this.documentUrl = this.DocInfo.get_Url(); this.documentUrl = this.DocInfo.get_Url();
documentTitle = this.DocInfo.get_Title(); this.documentTitle = this.DocInfo.get_Title();
documentFormat = this.DocInfo.get_Format(); documentFormat = this.DocInfo.get_Format();
this.documentCallbackUrl = this.DocInfo.get_CallbackUrl(); this.documentCallbackUrl = this.DocInfo.get_CallbackUrl();
var nIndex = -1; var nIndex = -1;
if (documentTitle) { if (this.documentTitle) {
nIndex = documentTitle.lastIndexOf("."); nIndex = this.documentTitle.lastIndexOf(".");
} }
if (-1 != nIndex) { if (-1 != nIndex) {
documentTitleWithoutExtention = documentTitle.substring(0, nIndex); documentTitleWithoutExtention = this.documentTitle.substring(0, nIndex);
} else { } else {
documentTitleWithoutExtention = documentTitle; documentTitleWithoutExtention = this.documentTitle;
} }
documentVKey = this.DocInfo.get_VKey(); documentVKey = this.DocInfo.get_VKey();
...@@ -598,9 +596,8 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) { ...@@ -598,9 +596,8 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
this.User.asc_setUserName(this.DocInfo.get_UserName()); this.User.asc_setUserName(this.DocInfo.get_UserName());
} }
this.DocumentName = documentTitle;
if (undefined !== window["AscDesktopEditor"]) { if (undefined !== window["AscDesktopEditor"]) {
window["AscDesktopEditor"]["SetDocumentName"](this.DocumentName); window["AscDesktopEditor"]["SetDocumentName"](this.documentTitle);
} }
}; };
asc_docs_api.prototype.asc_setLocale = function(val) asc_docs_api.prototype.asc_setLocale = function(val)
...@@ -624,7 +621,7 @@ asc_docs_api.prototype.LoadDocument = function(isVersionHistory) { ...@@ -624,7 +621,7 @@ asc_docs_api.prototype.LoadDocument = function(isVersionHistory) {
"vkey": documentVKey, "vkey": documentVKey,
"editorid": c_oEditorId.Word, "editorid": c_oEditorId.Word,
"url": this.documentUrl, "url": this.documentUrl,
"title": documentTitle, "title": this.documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts, "embeddedfonts": this.isUseEmbeddedCutFonts,
"viewmode": this.isViewMode "viewmode": this.isViewMode
}; };
...@@ -869,7 +866,7 @@ asc_docs_api.prototype.OpenDocument2 = function(url, gObject) ...@@ -869,7 +866,7 @@ asc_docs_api.prototype.OpenDocument2 = function(url, gObject)
}; };
asc_docs_api.prototype.get_DocumentName = function() asc_docs_api.prototype.get_DocumentName = function()
{ {
return this.DocumentName; return this.documentTitle;
}; };
// Callbacks // Callbacks
/* все имена callback'оф начинаются с On. Пока сделаны: /* все имена callback'оф начинаются с On. Пока сделаны:
...@@ -2131,7 +2128,7 @@ asc_docs_api.prototype.asc_setAdvancedOptions = function(idOption, option) { ...@@ -2131,7 +2128,7 @@ asc_docs_api.prototype.asc_setAdvancedOptions = function(idOption, option) {
"editorid": c_oEditorId.Word, "editorid": c_oEditorId.Word,
"c":"reopen", "c":"reopen",
"url": this.documentUrl, "url": this.documentUrl,
"title": documentTitle, "title": this.documentTitle,
"codepage": option.asc_getCodePage(), "codepage": option.asc_getCodePage(),
"embeddedfonts": t.isUseEmbeddedCutFonts "embeddedfonts": t.isUseEmbeddedCutFonts
}; };
...@@ -6600,7 +6597,7 @@ function _downloadAs(editor, command, filetype, actionType, options, fCallbackRe ...@@ -6600,7 +6597,7 @@ function _downloadAs(editor, command, filetype, actionType, options, fCallbackRe
oAdditionalData["userid"] = editor.documentUserId; oAdditionalData["userid"] = editor.documentUserId;
oAdditionalData["vkey"] = documentVKey; oAdditionalData["vkey"] = documentVKey;
oAdditionalData["outputformat"] = filetype; oAdditionalData["outputformat"] = filetype;
oAdditionalData["title"] = changeFileExtention(documentTitle, getExtentionByFormat(filetype)); oAdditionalData["title"] = changeFileExtention(editor.documentTitle, getExtentionByFormat(filetype));
oAdditionalData["savetype"] = c_oAscSaveTypes.CompleteAll; oAdditionalData["savetype"] = c_oAscSaveTypes.CompleteAll;
if (options.isNoData) { if (options.isNoData) {
;//nothing ;//nothing
......
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