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