Commit 882f943e authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

refactoring coauthoring init

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50050 954022d7-b5bf-4e40-9824-e11837661b57
parent ef7ea168
...@@ -1259,25 +1259,21 @@ asc_docs_api.prototype._coAuthoringInit = function() ...@@ -1259,25 +1259,21 @@ asc_docs_api.prototype._coAuthoringInit = function()
return; // Error return; // Error
} }
if(undefined !== window['g_cAscCoAuthoringUrl']) if (undefined !== window['g_cAscCoAuthoringUrl'])
window.g_cAscCoAuthoringUrl = window['g_cAscCoAuthoringUrl']; window.g_cAscCoAuthoringUrl = window['g_cAscCoAuthoringUrl'];
if (undefined !== window.g_cAscCoAuthoringUrl) {
if(undefined !== window.g_cAscCoAuthoringUrl)
{
//Turn off CoAuthoring feature if it disabled //Turn off CoAuthoring feature if it disabled
if(!this.isCoAuthoringEnable) if (!this.isCoAuthoringEnable)
window.g_cAscCoAuthoringUrl = ""; window.g_cAscCoAuthoringUrl = "";
this.CoAuthoringApi.set_url(window.g_cAscCoAuthoringUrl); this.CoAuthoringApi.set_url(window.g_cAscCoAuthoringUrl);
} }
//���� ������ ����������� ������������, ����� ������� ��� ����������� ������������� ���. //Если User не задан, отключаем коавторинг.
if(undefined === editor.User || null === editor.User || if (null == this.User || null == this.User.asc_getId()) {
undefined === editor.User.asc_getId() || null === editor.User.asc_getId())
{
var asc_user = window["Asc"].asc_CUser; var asc_user = window["Asc"].asc_CUser;
editor.User = new asc_user(); this.User = new asc_user();
editor.User.asc_setId("Unknown"); this.User.asc_setId("Unknown");
editor.User.asc_setUserName("Unknown"); this.User.asc_setUserName("Unknown");
this.CoAuthoringApi.set_url(""); this.CoAuthoringApi.set_url("");
} }
......
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