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