Commit 0dc18375 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

documentId в base

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66341 954022d7-b5bf-4e40-9824-e11837661b57
parent 23c5b9c1
......@@ -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.documentId = undefined;
// Тип состояния на данный момент (сохранение, открытие или никакое)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.None;
......
......@@ -1433,7 +1433,7 @@ CopyProcessor.prototype =
if(elementsContent.DocContent || (elementsContent.Drawings && elementsContent.Drawings.length) || (elementsContent.SlideObjects && elementsContent.SlideObjects.length))
{
this.oPresentationWriter.WriteString2(documentId);
this.oPresentationWriter.WriteString2(this.api.documentId);
this.oPresentationWriter.WriteDouble(presentation.Width);
this.oPresentationWriter.WriteDouble(presentation.Height);
}
......@@ -2489,9 +2489,9 @@ function Editor_Paste_Exec(api, pastebin, nodeDisplay, onlyBinary)
}
function trimString( str ){
return str.replace(/^\s+|\s+$/g, '') ;
};
}
function sendImgUrls(api, images, callback, bExcel) {
var rData = {"id": bExcel ? api.documentId : documentId, "c": "imgurls", "vkey": bExcel ? api.documentVKey : documentVKey, "userid": bExcel ? api.documentUserId : documentUserId, "saveindex": g_oDocumentUrls.getMaxIndex(), "data": images};
var rData = {"id": api.documentId, "c": "imgurls", "vkey": bExcel ? api.documentVKey : documentVKey, "userid": bExcel ? api.documentUserId : documentUserId, "saveindex": g_oDocumentUrls.getMaxIndex(), "data": images};
if(!bExcel)
api.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
else
......@@ -3488,7 +3488,7 @@ PasteProcessor.prototype =
else
master = presentation.slideMasters[0];
if(documentId !== p_url)
if(this.api.documentId !== p_url)
{
var layouts_count = stream.GetULong();
for(var i = 0; i < layouts_count; ++i)
......
......@@ -43,7 +43,6 @@ var editor;
this.wbModel = null;
this.DocumentName = "";
this.documentId = undefined;
this.documentUserId = undefined;
this.documentUrl = "null";
this.documentUrlChanges = null;
......
"use strict";
var documentId = undefined;
var documentUserId = undefined;
var documentUrl = 'null';
var documentUrlChanges = null;
......@@ -472,7 +471,7 @@ asc_docs_api.prototype._coAuthoringInit = function() {
if (!(window["NATIVE_EDITOR_ENJINE"] || offlineMode === documentUrl)) {
this.CoAuthoringApi.set_url(null);
}
this.CoAuthoringApi.init(this.User, documentId, documentCallbackUrl, 'fghhfgsjdgfjs', c_oEditorId.Presentation, documentFormatSave);
this.CoAuthoringApi.init(this.User, this.documentId, documentCallbackUrl, 'fghhfgsjdgfjs', c_oEditorId.Presentation, documentFormatSave);
// ToDo init other callbacks
};
......@@ -647,7 +646,7 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
}
if (this.DocInfo) {
documentId = this.DocInfo.get_Id();
this.documentId = this.DocInfo.get_Id();
documentUserId = this.DocInfo.get_UserId();
documentUrl = this.DocInfo.get_Url();
documentTitle = this.DocInfo.get_Title();
......@@ -690,7 +689,7 @@ asc_docs_api.prototype.LoadDocument = function() {
if (offlineMode !== documentUrl) {
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
var rData = {
"id": documentId,
"id": this.documentId,
"userid": documentUserId,
"format": documentFormat,
"vkey": documentVKey,
......@@ -1953,7 +1952,7 @@ asc_docs_api.prototype.put_ShowSnapLines = function(isShow)
asc_docs_api.prototype.get_ShowSnapLines = function()
{
return this.ShowSnapLines;
}
};
asc_docs_api.prototype.put_ShowParaMarks = function(isShow){
this.ShowParaMarks = isShow;
......@@ -2092,7 +2091,7 @@ asc_docs_api.prototype.ShapeApply = function(prop)
oApi.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
};
var rData = {
"id":documentId,
"id":this.documentId,
"userid": documentUserId,
"vkey": documentVKey,
"c":"imgurl",
......@@ -2903,7 +2902,7 @@ asc_docs_api.prototype.ChangeArtImageFromFile = function()
asc_docs_api.prototype.AddImage = function(){
var t = this;
ShowImageFileDialog(documentId, documentUserId, function (error, files) {
ShowImageFileDialog(this.documentId, documentUserId, function (error, files) {
t._uploadCallback(error, files);
}, function (error) {
if (c_oAscError.ID.No !== error)
......@@ -2917,7 +2916,7 @@ asc_docs_api.prototype._uploadCallback = function(error, files) {
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
} else {
t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
UploadImageFiles(files, documentId, documentUserId, function (error, url) {
UploadImageFiles(files, this.documentId, documentUserId, function (error, url) {
if (c_oAscError.ID.No !== error)
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else
......@@ -2962,7 +2961,7 @@ asc_docs_api.prototype.AddImageUrl = function(url){
else
{
var rData = {
"id":documentId,
"id":this.documentId,
"userid": documentUserId,
"vkey": documentVKey,
"c":"imgurl",
......@@ -3065,7 +3064,7 @@ asc_docs_api.prototype.AddImageUrlActionCallback = function(_image)
this.WordControl.m_oLogicDocument.Add_FlowImage(_w, _h, src);
}
}
};
asc_docs_api.prototype.AddImageUrlAction = function(url){
var _image = this.ImageLoader.LoadImage(url, 1);
......@@ -3179,7 +3178,7 @@ asc_docs_api.prototype.ImgApply = function(obj){
};
var rData = {
"id":documentId,
"id":this.documentId,
"userid": documentUserId,
"vkey": documentVKey,
"c":"imgurl",
......@@ -3205,7 +3204,7 @@ asc_docs_api.prototype.ChartApply = function(obj)
}
}
this.WordControl.m_oLogicDocument.ChartApply(obj);
}
};
asc_docs_api.prototype.set_Size = function(width, height){
};
......@@ -4993,7 +4992,7 @@ function _downloadAs(editor, filetype, actionType, options)
var command = "save";
var oAdditionalData = {};
oAdditionalData["c"] = command;
oAdditionalData["id"] = documentId;
oAdditionalData["id"] = editor.documentId;
oAdditionalData["userid"] = documentUserId;
oAdditionalData["vkey"] = documentVKey;
oAdditionalData["outputformat"] = filetype;
......
"use strict";
var documentId = undefined;
var documentUserId = undefined;
var documentUrl = 'null';
var documentUrlChanges = null;
......@@ -578,7 +577,7 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
}
if (this.DocInfo) {
documentId = this.DocInfo.get_Id();
this.documentId = this.DocInfo.get_Id();
documentUserId = this.DocInfo.get_UserId();
documentUrl = this.DocInfo.get_Url();
documentTitle = this.DocInfo.get_Title();
......@@ -623,7 +622,7 @@ asc_docs_api.prototype.LoadDocument = function(isVersionHistory) {
if (offlineMode !== documentUrl) {
var rData = {
"c": 'open',
"id": documentId,
"id": this.documentId,
"userid": documentUserId,
"format": documentFormat,
"vkey": documentVKey,
......@@ -1237,7 +1236,7 @@ asc_docs_api.prototype._coAuthoringInit = function() {
if (!(window["NATIVE_EDITOR_ENJINE"] || offlineMode === documentUrl)) {
this.CoAuthoringApi.set_url(null);
}
this.CoAuthoringApi.init(this.User, documentId, documentCallbackUrl, 'fghhfgsjdgfjs', c_oEditorId.Word, documentFormatSave);
this.CoAuthoringApi.init(this.User, this.documentId, documentCallbackUrl, 'fghhfgsjdgfjs', c_oEditorId.Word, documentFormatSave);
};
// server disconnect
......@@ -1268,7 +1267,7 @@ asc_docs_api.prototype._coSpellCheckInit = function() {
};
}
this.SpellCheckApi.init(documentId);
this.SpellCheckApi.init(this.documentId);
};
asc_docs_api.prototype.asc_getSpellCheckLanguages = function() {
......@@ -2129,7 +2128,7 @@ asc_docs_api.prototype.asc_setAdvancedOptions = function(idOption, option) {
// Проверяем тип состояния в данный момент
if (this.advancedOptionsAction === c_oAscAdvancedOptionsAction.Open) {
var rData = {
"id":documentId,
"id":this.documentId,
"userid": documentUserId,
"format": documentFormat,
"vkey": documentVKey,
......@@ -4401,7 +4400,7 @@ asc_docs_api.prototype.ChangeShapeImageFromFile = function()
asc_docs_api.prototype.AddImage = function(){
var t = this;
ShowImageFileDialog(documentId, documentUserId, function(error, files){
ShowImageFileDialog(this.documentId, documentUserId, function(error, files){
t._uploadCallback(error, files);
}, function (error) {
if (c_oAscError.ID.No !== error)
......@@ -4415,7 +4414,7 @@ asc_docs_api.prototype._uploadCallback = function(error, files){
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
} else {
t.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
UploadImageFiles(files, documentId, documentUserId, function (error, url) {
UploadImageFiles(files, this.documentId, documentUserId, function (error, url) {
if (c_oAscError.ID.No !== error)
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else
......@@ -4423,7 +4422,7 @@ asc_docs_api.prototype._uploadCallback = function(error, files){
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
}
}
};
asc_docs_api.prototype.AddImageUrl2 = function(url)
{
this.AddImageUrl(getFullImageSrc2(url));
......@@ -4440,7 +4439,7 @@ asc_docs_api.prototype.AddImageUrl = function(url, imgProp)
else
{
var rData = {
"id": documentId,
"id": this.documentId,
"userid": documentUserId,
"vkey": documentVKey,
"c": "imgurl",
......@@ -4756,7 +4755,7 @@ asc_docs_api.prototype.ImgApply = function(obj)
if(sImageUrl){
var rData = {
"id": documentId,
"id": this.documentId,
"userid": documentUserId,
"vkey": documentVKey,
"c": "imgurl",
......@@ -6601,7 +6600,7 @@ function _downloadAs(editor, command, filetype, actionType, options, fCallbackRe
var dataContainer = {data: null, part: null, index: 0, count: 0};
var oAdditionalData = {};
oAdditionalData["c"] = command;
oAdditionalData["id"] = documentId;
oAdditionalData["id"] = editor.documentId;
oAdditionalData["userid"] = documentUserId;
oAdditionalData["vkey"] = documentVKey;
oAdditionalData["outputformat"] = filetype;
......
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