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

Поправил проблему с url для coAuthoring (при переходе в историю версий все...

Поправил проблему с url для coAuthoring (при переходе в историю версий все равно подключались к совместному редактированию)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@63516 954022d7-b5bf-4e40-9824-e11837661b57
parent 4f27e976
...@@ -1497,17 +1497,15 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1497,17 +1497,15 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
spreadsheet_api.prototype._coAuthoringInit = function() { spreadsheet_api.prototype._coAuthoringInit = function() {
var t = this; var t = this;
if (this.CoAuthoringUrl && this.isCoAuthoringEnable) { if (!this.isCoAuthoringEnable)
// Если есть в настройках сервер, то выставляем его для соединения this.CoAuthoringUrl = '';
this._coAuthoringSetServerUrl(this.CoAuthoringUrl);
}
//Если User не задан, отключаем коавторинг. //Если User не задан, отключаем коавторинг.
if (null == this.User || null == this.User.asc_getId()) { if (null == this.User || null == this.User.asc_getId()) {
this.User = new asc.asc_CUser(); this.User = new asc.asc_CUser();
this.User.asc_setId("Unknown"); this.User.asc_setId("Unknown");
this.User.asc_setUserName("Unknown"); this.User.asc_setUserName("Unknown");
this._coAuthoringSetServerUrl(""); this.CoAuthoringUrl = '';
} }
this.collaborativeEditing = new asc_CCollaborativeEditing(/*handlers*/{ this.collaborativeEditing = new asc_CCollaborativeEditing(/*handlers*/{
...@@ -1711,6 +1709,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -1711,6 +1709,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
} }
}; };
this._coAuthoringSetServerUrl(this.CoAuthoringUrl);
this.CoAuthoringApi.init(t.User, t.documentId, t.documentCallbackUrl, 'fghhfgsjdgfjs', this.CoAuthoringApi.init(t.User, t.documentId, t.documentCallbackUrl, 'fghhfgsjdgfjs',
function(){}, c_oEditorId.Spreadsheet, t.documentFormatSave, t.asc_getViewerMode()); function(){}, c_oEditorId.Spreadsheet, t.documentFormatSave, t.asc_getViewerMode());
}; };
......
...@@ -269,15 +269,15 @@ asc_docs_api.prototype._coAuthoringInit = function () { ...@@ -269,15 +269,15 @@ asc_docs_api.prototype._coAuthoringInit = function () {
return; // Error return; // Error
} }
if (this.CoAuthoringUrl && this.isCoAuthoringEnable) if (!this.isCoAuthoringEnable)
this._coAuthoringSetServerUrl(this.CoAuthoringUrl); this.CoAuthoringUrl = '';
if (null == this.User || null == this.User.asc_getId()) { if (null == this.User || null == this.User.asc_getId()) {
this.User = new Asc.asc_CUser(); this.User = new Asc.asc_CUser();
this.User.asc_setId("Unknown"); this.User.asc_setId("Unknown");
this.User.asc_setUserName("Unknown"); this.User.asc_setUserName("Unknown");
this._coAuthoringSetServerUrl(""); this.CoAuthoringUrl = '';
} }
var t = this; var t = this;
...@@ -541,6 +541,7 @@ asc_docs_api.prototype._coAuthoringInit = function () { ...@@ -541,6 +541,7 @@ asc_docs_api.prototype._coAuthoringInit = function () {
} }
}; };
this.CoAuthoringApi.set_url(this.CoAuthoringUrl);
this.CoAuthoringApi.init(this.User, documentId, documentCallbackUrl, 'fghhfgsjdgfjs', function(){}, c_oEditorId.Presentation, this.CoAuthoringApi.init(this.User, documentId, documentCallbackUrl, 'fghhfgsjdgfjs', function(){}, c_oEditorId.Presentation,
documentFormatSave, this.isViewMode); documentFormatSave, this.isViewMode);
......
...@@ -1365,8 +1365,8 @@ asc_docs_api.prototype._coAuthoringInit = function() ...@@ -1365,8 +1365,8 @@ asc_docs_api.prototype._coAuthoringInit = function()
return; // Error return; // Error
} }
if (this.CoAuthoringUrl && this.isCoAuthoringEnable) if (!this.isCoAuthoringEnable)
this.CoAuthoringApi.set_url(this.CoAuthoringUrl); this.CoAuthoringUrl = '';
//Если User не задан, отключаем коавторинг. //Если User не задан, отключаем коавторинг.
if (null == this.User || null == this.User.asc_getId()) { if (null == this.User || null == this.User.asc_getId()) {
...@@ -1374,7 +1374,7 @@ asc_docs_api.prototype._coAuthoringInit = function() ...@@ -1374,7 +1374,7 @@ asc_docs_api.prototype._coAuthoringInit = function()
this.User.asc_setId("Unknown"); this.User.asc_setId("Unknown");
this.User.asc_setUserName("Unknown"); this.User.asc_setUserName("Unknown");
this.CoAuthoringApi.set_url(""); this.CoAuthoringUrl = '';
} }
var t = this; var t = this;
...@@ -1531,6 +1531,7 @@ asc_docs_api.prototype._coAuthoringInit = function() ...@@ -1531,6 +1531,7 @@ asc_docs_api.prototype._coAuthoringInit = function()
} }
}; };
this.CoAuthoringApi.set_url(this.CoAuthoringUrl);
this.CoAuthoringApi.init(this.User, documentId, documentCallbackUrl, 'fghhfgsjdgfjs', function(){}, this.CoAuthoringApi.init(this.User, documentId, documentCallbackUrl, 'fghhfgsjdgfjs', function(){},
c_oEditorId.Word, documentFormatSave, this.isViewMode); c_oEditorId.Word, documentFormatSave, this.isViewMode);
......
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