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

documentUserId в base

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66373 954022d7-b5bf-4e40-9824-e11837661b57
parent 6bab6757
......@@ -20,6 +20,7 @@ function baseEditorsApi(name) {
this.DocumentType = 0; // 0 - empty, 1 - test, 2 - document (from json)
this.DocInfo = 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": bExcel ? api.documentUserId : documentUserId, "saveindex": g_oDocumentUrls.getMaxIndex(), "data": images};
var rData = {"id": api.documentId, "c": "imgurls", "vkey": bExcel ? api.documentVKey : documentVKey, "userid": api.documentUserId, "saveindex": g_oDocumentUrls.getMaxIndex(), "data": images};
if(!bExcel)
api.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.LoadImage);
else
......
......@@ -43,7 +43,6 @@ var editor;
this.wbModel = null;
this.DocumentName = "";
this.documentUserId = undefined;
this.documentUrlChanges = null;
this.documentTitle = "null";
this.documentFormat = "null";
......
"use strict";
var documentUserId = undefined;
var documentUrlChanges = null;
var documentTitle = 'null';
var documentTitleWithoutExtention = 'null';
......@@ -646,7 +645,7 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
if (this.DocInfo) {
this.documentId = this.DocInfo.get_Id();
documentUserId = this.DocInfo.get_UserId();
this.documentUserId = this.DocInfo.get_UserId();
this.documentUrl = this.DocInfo.get_Url();
documentTitle = this.DocInfo.get_Title();
documentFormat = this.DocInfo.get_Format();
......@@ -689,7 +688,7 @@ asc_docs_api.prototype.LoadDocument = function() {
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
var rData = {
"id": this.documentId,
"userid": documentUserId,
"userid": this.documentUserId,
"format": documentFormat,
"vkey": documentVKey,
"editorid": c_oEditorId.Presentation,
......@@ -2091,7 +2090,7 @@ asc_docs_api.prototype.ShapeApply = function(prop)
};
var rData = {
"id":this.documentId,
"userid": documentUserId,
"userid": this.documentUserId,
"vkey": documentVKey,
"c":"imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(),
......@@ -2901,7 +2900,7 @@ asc_docs_api.prototype.ChangeArtImageFromFile = function()
asc_docs_api.prototype.AddImage = function(){
var t = this;
ShowImageFileDialog(this.documentId, documentUserId, function (error, files) {
ShowImageFileDialog(this.documentId, this.documentUserId, function (error, files) {
t._uploadCallback(error, files);
}, function (error) {
if (c_oAscError.ID.No !== error)
......@@ -2915,7 +2914,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, this.documentId, documentUserId, function (error, url) {
UploadImageFiles(files, this.documentId, this.documentUserId, function (error, url) {
if (c_oAscError.ID.No !== error)
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else
......@@ -2923,7 +2922,7 @@ asc_docs_api.prototype._uploadCallback = function(error, files) {
t.sync_EndAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.UploadImage);
});
}
}
};
asc_docs_api.prototype.StartAddShape = function(prst, is_apply)
{
this.WordControl.m_oLogicDocument.StartAddShape(prst, is_apply);
......@@ -2961,7 +2960,7 @@ asc_docs_api.prototype.AddImageUrl = function(url){
{
var rData = {
"id":this.documentId,
"userid": documentUserId,
"userid": this.documentUserId,
"vkey": documentVKey,
"c":"imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(),
......@@ -3178,7 +3177,7 @@ asc_docs_api.prototype.ImgApply = function(obj){
var rData = {
"id":this.documentId,
"userid": documentUserId,
"userid": this.documentUserId,
"vkey": documentVKey,
"c":"imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(),
......@@ -4992,7 +4991,7 @@ function _downloadAs(editor, filetype, actionType, options)
var oAdditionalData = {};
oAdditionalData["c"] = command;
oAdditionalData["id"] = editor.documentId;
oAdditionalData["userid"] = documentUserId;
oAdditionalData["userid"] = editor.documentUserId;
oAdditionalData["vkey"] = documentVKey;
oAdditionalData["outputformat"] = filetype;
oAdditionalData["title"] = changeFileExtention(documentTitle, getExtentionByFormat(filetype));
......
......@@ -115,7 +115,7 @@ asc_docs_api.prototype.asc_setMailMergeData = function(aList)
asc_docs_api.prototype.asc_sendMailMergeData = function(oData)
{
var actionType = c_oAscAsyncAction.SendMailMerge;
oData.put_UserId(documentUserId);
oData.put_UserId(this.documentUserId);
oData.put_RecordCount(oData.get_RecordTo() - oData.get_RecordFrom() + 1);
var options = {oMailMergeSendData: oData, isNoCallback: true};
var t = this;
......
"use strict";
var documentUserId = undefined;
var documentUrlChanges = null;
var documentTitle = 'null';
var documentTitleWithoutExtention = 'null';
......@@ -577,7 +576,7 @@ asc_docs_api.prototype.asc_setDocInfo = function(c_DocInfo) {
if (this.DocInfo) {
this.documentId = this.DocInfo.get_Id();
documentUserId = this.DocInfo.get_UserId();
this.documentUserId = this.DocInfo.get_UserId();
this.documentUrl = this.DocInfo.get_Url();
documentTitle = this.DocInfo.get_Title();
documentFormat = this.DocInfo.get_Format();
......@@ -622,7 +621,7 @@ asc_docs_api.prototype.LoadDocument = function(isVersionHistory) {
var rData = {
"c": 'open',
"id": this.documentId,
"userid": documentUserId,
"userid": this.documentUserId,
"format": documentFormat,
"vkey": documentVKey,
"editorid": c_oEditorId.Word,
......@@ -2128,7 +2127,7 @@ asc_docs_api.prototype.asc_setAdvancedOptions = function(idOption, option) {
if (this.advancedOptionsAction === c_oAscAdvancedOptionsAction.Open) {
var rData = {
"id":this.documentId,
"userid": documentUserId,
"userid": this.documentUserId,
"format": documentFormat,
"vkey": documentVKey,
"editorid": c_oEditorId.Word,
......@@ -4399,7 +4398,7 @@ asc_docs_api.prototype.ChangeShapeImageFromFile = function()
asc_docs_api.prototype.AddImage = function(){
var t = this;
ShowImageFileDialog(this.documentId, documentUserId, function(error, files){
ShowImageFileDialog(this.documentId, this.documentUserId, function(error, files){
t._uploadCallback(error, files);
}, function (error) {
if (c_oAscError.ID.No !== error)
......@@ -4413,7 +4412,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, this.documentId, documentUserId, function (error, url) {
UploadImageFiles(files, this.documentId, this.documentUserId, function (error, url) {
if (c_oAscError.ID.No !== error)
t.sync_ErrorCallback(error, c_oAscError.Level.NoCritical);
else
......@@ -4439,7 +4438,7 @@ asc_docs_api.prototype.AddImageUrl = function(url, imgProp)
{
var rData = {
"id": this.documentId,
"userid": documentUserId,
"userid": this.documentUserId,
"vkey": documentVKey,
"c": "imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(),
......@@ -4755,7 +4754,7 @@ asc_docs_api.prototype.ImgApply = function(obj)
if(sImageUrl){
var rData = {
"id": this.documentId,
"userid": documentUserId,
"userid": this.documentUserId,
"vkey": documentVKey,
"c": "imgurl",
"saveindex": g_oDocumentUrls.getMaxIndex(),
......@@ -6600,7 +6599,7 @@ function _downloadAs(editor, command, filetype, actionType, options, fCallbackRe
var oAdditionalData = {};
oAdditionalData["c"] = command;
oAdditionalData["id"] = editor.documentId;
oAdditionalData["userid"] = documentUserId;
oAdditionalData["userid"] = editor.documentUserId;
oAdditionalData["vkey"] = documentVKey;
oAdditionalData["outputformat"] = filetype;
oAdditionalData["title"] = changeFileExtention(documentTitle, getExtentionByFormat(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