Commit 9e72994a authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

documentVKey to baseEditorsApi

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66384 954022d7-b5bf-4e40-9824-e11837661b57
parent e1b8f9d7
...@@ -19,6 +19,7 @@ function baseEditorsApi(name) { ...@@ -19,6 +19,7 @@ function baseEditorsApi(name) {
this.LoadedObject = null; this.LoadedObject = null;
this.DocumentType = 0; // 0 - empty, 1 - test, 2 - document (from json) this.DocumentType = 0; // 0 - empty, 1 - test, 2 - document (from json)
this.DocInfo = null; this.DocInfo = null;
this.documentVKey = null;
this.documentId = undefined; this.documentId = undefined;
this.documentUserId = undefined; this.documentUserId = undefined;
this.documentUrl = "null"; this.documentUrl = "null";
......
...@@ -2491,7 +2491,7 @@ function trimString( str ){ ...@@ -2491,7 +2491,7 @@ function trimString( str ){
return str.replace(/^\s+|\s+$/g, '') ; return str.replace(/^\s+|\s+$/g, '') ;
} }
function sendImgUrls(api, images, callback, bExcel) { function sendImgUrls(api, images, callback, bExcel) {
var rData = {"id": api.documentId, "c": "imgurls", "vkey": bExcel ? api.documentVKey : documentVKey, "userid": api.documentUserId, "saveindex": g_oDocumentUrls.getMaxIndex(), "data": images}; var rData = {"id": api.documentId, "c": "imgurls", "vkey": api.documentVKey, "userid": api.documentUserId, "saveindex": g_oDocumentUrls.getMaxIndex(), "data": images};
if(!bExcel) if(!bExcel)
api.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage); api.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
else else
......
...@@ -42,7 +42,6 @@ var editor; ...@@ -42,7 +42,6 @@ var editor;
this.wb = null; this.wb = null;
this.wbModel = null; this.wbModel = null;
this.documentVKey = null;
this.documentFormatSave = c_oAscFileType.XLSX; this.documentFormatSave = c_oAscFileType.XLSX;
this.chartEditor = undefined; this.chartEditor = undefined;
this.documentOpenOptions = undefined; // Опции при открытии (пока только опции для CSV) this.documentOpenOptions = undefined; // Опции при открытии (пока только опции для CSV)
......
"use strict"; "use strict";
var documentVKey = null;
var documentFormatSave = c_oAscFileType.PPTX;//пока не во что другое сохранять не можем. var documentFormatSave = c_oAscFileType.PPTX;//пока не во что другое сохранять не можем.
var c_oSerFormat = { var c_oSerFormat = {
...@@ -644,7 +643,7 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) { ...@@ -644,7 +643,7 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
this.documentTitle = this.DocInfo.get_Title(); this.documentTitle = this.DocInfo.get_Title();
this.documentFormat = this.DocInfo.get_Format(); this.documentFormat = this.DocInfo.get_Format();
this.documentCallbackUrl = this.DocInfo.get_CallbackUrl(); this.documentCallbackUrl = this.DocInfo.get_CallbackUrl();
documentVKey = this.DocInfo.get_VKey(); this.documentVKey = this.DocInfo.get_VKey();
var sProtocol = window.location.protocol; var sProtocol = window.location.protocol;
this.documentOrigin = ((sProtocol && '' !== sProtocol) ? sProtocol + '//' : '') + window.location.host; this.documentOrigin = ((sProtocol && '' !== sProtocol) ? sProtocol + '//' : '') + window.location.host;
...@@ -673,7 +672,7 @@ asc_docs_api.prototype.LoadDocument = function() { ...@@ -673,7 +672,7 @@ asc_docs_api.prototype.LoadDocument = function() {
"id": this.documentId, "id": this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
"format": this.documentFormat, "format": this.documentFormat,
"vkey": documentVKey, "vkey": this.documentVKey,
"editorid": c_oEditorId.Presentation, "editorid": c_oEditorId.Presentation,
"c": "open", "c": "open",
"url": this.documentUrl, "url": this.documentUrl,
...@@ -2070,7 +2069,7 @@ asc_docs_api.prototype.ShapeApply = function(prop) ...@@ -2070,7 +2069,7 @@ asc_docs_api.prototype.ShapeApply = function(prop)
var rData = { var rData = {
"id":this.documentId, "id":this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
"vkey": documentVKey, "vkey": this.documentVKey,
"c":"imgurl", "c":"imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(), "saveindex": g_oDocumentUrls.getMaxIndex(),
"data": sImageUrl}; "data": sImageUrl};
...@@ -2940,7 +2939,7 @@ asc_docs_api.prototype.AddImageUrl = function(url){ ...@@ -2940,7 +2939,7 @@ asc_docs_api.prototype.AddImageUrl = function(url){
var rData = { var rData = {
"id":this.documentId, "id":this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
"vkey": documentVKey, "vkey": this.documentVKey,
"c":"imgurl", "c":"imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(), "saveindex": g_oDocumentUrls.getMaxIndex(),
"data": url}; "data": url};
...@@ -3157,7 +3156,7 @@ asc_docs_api.prototype.ImgApply = function(obj){ ...@@ -3157,7 +3156,7 @@ asc_docs_api.prototype.ImgApply = function(obj){
var rData = { var rData = {
"id":this.documentId, "id":this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
"vkey": documentVKey, "vkey": this.documentVKey,
"c":"imgurl", "c":"imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(), "saveindex": g_oDocumentUrls.getMaxIndex(),
"data": sImageUrl}; "data": sImageUrl};
...@@ -4971,7 +4970,7 @@ function _downloadAs(editor, filetype, actionType, options) ...@@ -4971,7 +4970,7 @@ function _downloadAs(editor, filetype, actionType, options)
oAdditionalData["c"] = command; oAdditionalData["c"] = command;
oAdditionalData["id"] = editor.documentId; oAdditionalData["id"] = editor.documentId;
oAdditionalData["userid"] = editor.documentUserId; oAdditionalData["userid"] = editor.documentUserId;
oAdditionalData["vkey"] = documentVKey; oAdditionalData["vkey"] = editor.documentVKey;
oAdditionalData["outputformat"] = filetype; oAdditionalData["outputformat"] = filetype;
oAdditionalData["title"] = changeFileExtention(editor.documentTitle, getExtentionByFormat(filetype)); oAdditionalData["title"] = changeFileExtention(editor.documentTitle, getExtentionByFormat(filetype));
oAdditionalData["savetype"] = c_oAscSaveTypes.CompleteAll; oAdditionalData["savetype"] = c_oAscSaveTypes.CompleteAll;
......
"use strict"; "use strict";
var documentVKey = null;
var documentFormatSave = c_oAscFileType.DOCX; var documentFormatSave = c_oAscFileType.DOCX;
function CAscSection() function CAscSection()
...@@ -575,7 +574,7 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) { ...@@ -575,7 +574,7 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
this.documentTitle = this.DocInfo.get_Title(); this.documentTitle = this.DocInfo.get_Title();
this.documentFormat = this.DocInfo.get_Format(); this.documentFormat = this.DocInfo.get_Format();
this.documentCallbackUrl = this.DocInfo.get_CallbackUrl(); this.documentCallbackUrl = this.DocInfo.get_CallbackUrl();
documentVKey = this.DocInfo.get_VKey(); this.documentVKey = this.DocInfo.get_VKey();
var sProtocol = window.location.protocol; var sProtocol = window.location.protocol;
this.documentOrigin = ((sProtocol && '' !== sProtocol) ? sProtocol + '//' : '') + window.location.host; this.documentOrigin = ((sProtocol && '' !== sProtocol) ? sProtocol + '//' : '') + window.location.host;
...@@ -606,7 +605,7 @@ asc_docs_api.prototype.LoadDocument = function(isVersionHistory) { ...@@ -606,7 +605,7 @@ asc_docs_api.prototype.LoadDocument = function(isVersionHistory) {
"id": this.documentId, "id": this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
"format": this.documentFormat, "format": this.documentFormat,
"vkey": documentVKey, "vkey": this.documentVKey,
"editorid": c_oEditorId.Word, "editorid": c_oEditorId.Word,
"url": this.documentUrl, "url": this.documentUrl,
"title": this.documentTitle, "title": this.documentTitle,
...@@ -2108,7 +2107,7 @@ asc_docs_api.prototype.asc_setAdvancedOptions = function(idOption, option) { ...@@ -2108,7 +2107,7 @@ asc_docs_api.prototype.asc_setAdvancedOptions = function(idOption, option) {
"id":this.documentId, "id":this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
"format": this.documentFormat, "format": this.documentFormat,
"vkey": documentVKey, "vkey": this.documentVKey,
"editorid": c_oEditorId.Word, "editorid": c_oEditorId.Word,
"c":"reopen", "c":"reopen",
"url": this.documentUrl, "url": this.documentUrl,
...@@ -4418,7 +4417,7 @@ asc_docs_api.prototype.AddImageUrl = function(url, imgProp) ...@@ -4418,7 +4417,7 @@ asc_docs_api.prototype.AddImageUrl = function(url, imgProp)
var rData = { var rData = {
"id": this.documentId, "id": this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
"vkey": documentVKey, "vkey": this.documentVKey,
"c": "imgurl", "c": "imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(), "saveindex": g_oDocumentUrls.getMaxIndex(),
"data": url}; "data": url};
...@@ -4734,7 +4733,7 @@ asc_docs_api.prototype.ImgApply = function(obj) ...@@ -4734,7 +4733,7 @@ asc_docs_api.prototype.ImgApply = function(obj)
var rData = { var rData = {
"id": this.documentId, "id": this.documentId,
"userid": this.documentUserId, "userid": this.documentUserId,
"vkey": documentVKey, "vkey": this.documentVKey,
"c": "imgurl", "c": "imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(), "saveindex": g_oDocumentUrls.getMaxIndex(),
"data": sImageToDownLoad}; "data": sImageToDownLoad};
...@@ -6579,7 +6578,7 @@ function _downloadAs(editor, command, filetype, actionType, options, fCallbackRe ...@@ -6579,7 +6578,7 @@ function _downloadAs(editor, command, filetype, actionType, options, fCallbackRe
oAdditionalData["c"] = command; oAdditionalData["c"] = command;
oAdditionalData["id"] = editor.documentId; oAdditionalData["id"] = editor.documentId;
oAdditionalData["userid"] = editor.documentUserId; oAdditionalData["userid"] = editor.documentUserId;
oAdditionalData["vkey"] = documentVKey; oAdditionalData["vkey"] = editor.documentVKey;
oAdditionalData["outputformat"] = filetype; oAdditionalData["outputformat"] = filetype;
oAdditionalData["title"] = changeFileExtention(editor.documentTitle, getExtentionByFormat(filetype)); oAdditionalData["title"] = changeFileExtention(editor.documentTitle, getExtentionByFormat(filetype));
oAdditionalData["savetype"] = c_oAscSaveTypes.CompleteAll; oAdditionalData["savetype"] = c_oAscSaveTypes.CompleteAll;
......
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