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

(1.0.0.120): FileConverterUtils2

Добавил documentUrlChanges в объекте не открытии

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62415 954022d7-b5bf-4e40-9824-e11837661b57
parent ebb92476
......@@ -54,6 +54,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.documentId = undefined;
this.documentUserId = undefined;
this.documentUrl = "null";
this.documentUrlChanges = null;
this.documentTitle = "null";
this.documentTitleWithoutExtention = "null";
this.documentFormat = "null";
......@@ -436,7 +437,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.asc_setDocInfo(c_DocInfo);
if(this.DocInfo){
if (this.DocInfo) {
this.documentId = this.DocInfo["Id"];
this.documentUserId = this.DocInfo["UserId"];
this.documentUrl = this.DocInfo["Url"];
......@@ -1041,10 +1042,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
} else if (!this.documentId || !this.documentUrl) {
// Назначим id-сами, если он не пришел (для открытия тестового документа)
if (!this.documentId)
this.documentId = "9876543210";
this.documentId = '9876543210';
this._OfflineAppDocumentStartLoad(fCallback);
} else {
var v = {
"c" : '',
"id" : this.documentId,
"userid" : this.documentUserId,
"format" : this.documentFormat,
......@@ -1053,7 +1055,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
"url" : this.documentUrl,
"title" : this.documentTitle,
"embeddedfonts" : this.isUseEmbeddedCutFonts,
"viewmode" : this.asc_getViewerMode()
"viewmode" : this.asc_getViewerMode(),
"urlchanges" : this.documentUrlChanges
};
if (false && this.documentOpenOptions && this.documentOpenOptions["isEmpty"]) {
var sEmptyWorkbook = getEmptyWorkbook();
......@@ -1066,7 +1069,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
// Меняем тип состояния (на открытие)
this.advancedOptionsAction = c_oAscAdvancedOptionsAction.Open;
v["c"] = "open";
this._asc_sendCommand (fCallback, v);
this._asc_sendCommand(fCallback, v);
}
}
};
......@@ -3326,14 +3329,17 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
// Version History
spreadsheet_api.prototype.asc_showRevision = function () {
spreadsheet_api.prototype.asc_showRevision = function (url, urlChanges, currentChangeId) {
var bUpdate = true;
if (null === this.VersionHistory)
this.VersionHistory = new asc.CVersionHistory(url, urlChanges, currentChangeId);
else
bUpdate = this.VersionHistory.update(url, urlChanges, currentChangeId);
if (bUpdate) {
// ToDo Add code load file with changes
this.documentUrl = url;
this.documentUrlChanges = urlChanges;
this.isCoAuthoringEnable = false;
this.asc_LoadDocument();
}
};
......
......@@ -7,6 +7,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var documentId = undefined;
var documentUserId = undefined;
var documentUrl = 'null';
var documentUrlChanges = null;
var documentTitle = 'null';
var documentTitleWithoutExtention = 'null';
var documentFormat = 'null';
......@@ -800,7 +801,6 @@ asc_docs_api.prototype.asc_setLocale = function(val)
};
asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
{
this.asc_setDocInfo(c_DocInfo);
this.WordControl.m_oDrawingDocument.m_bIsOpeningDocument = true;
......@@ -853,16 +853,18 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
{
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
var rData = {
"id":documentId,
"userid": documentUserId,
"format": documentFormat,
"vkey": documentVKey,
"editorid": c_oEditorId.Presentation,
"c":"open",
"url": documentUrl,
"title": documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts,
"viewmode": this.isViewMode};
"id" : documentId,
"userid" : documentUserId,
"format" : documentFormat,
"vkey" : documentVKey,
"editorid" : c_oEditorId.Presentation,
"c" : "open",
"url" : documentUrl,
"title" : documentTitle,
"embeddedfonts" : this.isUseEmbeddedCutFonts,
"viewmode" : this.isViewMode,
"urlchanges" : documentUrlChanges
};
sendCommand( oThis, function(){}, rData );
......@@ -5040,7 +5042,10 @@ asc_docs_api.prototype.asc_showRevision = function (url, urlChanges, currentChan
else
bUpdate = this.VersionHistory.update(url, urlChanges, currentChangeId);
if (bUpdate) {
// ToDo Add code load file with changes
documentUrl = url;
documentUrlChanges = urlChanges;
this.isCoAuthoringEnable = false;
this.LoadDocument();
}
};
asc_docs_api.prototype.asc_undoAllChanges = function () {
......
......@@ -8,6 +8,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
var documentId = undefined;
var documentUserId = undefined;
var documentUrl = 'null';
var documentUrlChanges = null;
var documentTitle = 'null';
var documentTitleWithoutExtention = 'null';
var documentFormat = 'null';
......@@ -813,11 +814,10 @@ asc_docs_api.prototype.asc_setLocale = function(val)
};
asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
{
this.asc_setDocInfo(c_DocInfo);
this.WordControl.m_oDrawingDocument.m_bIsOpeningDocument = true;
if(this.DocInfo){
if (this.DocInfo) {
documentId = this.DocInfo.get_Id();
documentUserId = this.DocInfo.get_UserId();
documentUrl = this.DocInfo.get_Url();
......@@ -882,20 +882,24 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
if(documentId){
var oOpenOptions = this.DocInfo.get_Options();
var rData = {
"c" : '',
"id" : documentId,
"userid" : documentUserId,
"format" : documentFormat,
"vkey" : documentVKey,
"editorid" : c_oEditorId.Word,
"url" : documentUrl,
"title" : documentTitle,
"embeddedfonts" : this.isUseEmbeddedCutFonts,
"viewmode" : this.isViewMode,
"urlchanges" : documentUrlChanges
};
if(false && oOpenOptions && oOpenOptions["isEmpty"])
{
var rData = {
"c": "create",
"id": documentId,
"userid": documentUserId,
"format": documentFormat,
"vkey": documentVKey,
"editorid": c_oEditorId.Word,
"url": documentUrl,
"title": documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts,
"data": g_sEmpty_bin};
rData['c'] = 'create';
rData['data'] = g_sEmpty_bin;
sendCommand( oThis, function(){}, rData );
editor.OpenDocument2(g_sResourceServiceLocalUrl + documentId + "/", g_sEmpty_bin);
if(this.InterfaceLocale)
......@@ -907,19 +911,8 @@ asc_docs_api.prototype.LoadDocument = function(c_DocInfo)
}
else
{
rData['c'] = 'open';
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
var rData = {
"id": documentId,
"userid": documentUserId,
"format": documentFormat,
"vkey": documentVKey,
"editorid": c_oEditorId.Word,
"c": "open",
"url": documentUrl,
"title": documentTitle,
"embeddedfonts": this.isUseEmbeddedCutFonts,
"viewmode": this.isViewMode};
sendCommand( oThis, function(){}, rData );
}
this.sync_zoomChangeCallback(this.WordControl.m_nZoomValue, 0);
......@@ -7577,14 +7570,17 @@ asc_docs_api.prototype.asc_continueSaving = function () {
// Version History
asc_docs_api.prototype.asc_showRevision = function () {
asc_docs_api.prototype.asc_showRevision = function (url, urlChanges, currentChangeId) {
var bUpdate = true;
if (null === this.VersionHistory)
this.VersionHistory = new window["Asc"].CVersionHistory(url, urlChanges, currentChangeId);
else
bUpdate = this.VersionHistory.update(url, urlChanges, currentChangeId);
if (bUpdate) {
// ToDo Add code load file with changes
documentUrl = url;
documentUrlChanges = urlChanges;
this.isCoAuthoringEnable = false;
this.LoadDocument();
}
};
asc_docs_api.prototype.asc_undoAllChanges = function ()
......
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