Commit 7ef9e0cb authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

delete check exist coAuthoring. Now always exist

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64664 954022d7-b5bf-4e40-9824-e11837661b57
parent 062b71f1
......@@ -1511,11 +1511,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
}
}, this.asc_getViewerMode());
if (!this.CoAuthoringApi) {
this.asyncServerIdEndLoaded();
fCallback();
return; // Error
}
this.CoAuthoringApi.onParticipantsChanged = function(e, count) {
t.handlers.trigger("asc_onParticipantsChanged", e, count);
};
......@@ -1759,20 +1754,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
//в обычном серверном режиме портим ссылку, потому что CoAuthoring теперь имеет встроенный адрес
//todo надо использовать проверку get_OfflineApp
if (!(window["NATIVE_EDITOR_ENJINE"] || !this.documentId || !this.documentUrl)) {
this._coAuthoringSetServerUrl(null);
this.CoAuthoringApi.set_url(null);
}
this.CoAuthoringApi.init(t.User, t.documentId, t.documentCallbackUrl, 'fghhfgsjdgfjs', fCallback, c_oEditorId.Spreadsheet, t.documentFormatSave, t.asc_getViewerMode());
};
// Set CoAuthoring server url
spreadsheet_api.prototype._coAuthoringSetServerUrl = function(url) {
if (!this.CoAuthoringApi) {
return;
} // Error
this.CoAuthoringApi.set_url(url);
};
spreadsheet_api.prototype._onSaveChanges = function(recalcIndexColumns, recalcIndexRows) {
if (this.IsSendDocumentLoadCompleate) {
var arrChanges = this.wbModel.SerializeHistory();
......@@ -3382,30 +3368,18 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
/////////////////////////////////////////////////////////////////////////
// send chart message
spreadsheet_api.prototype.asc_coAuthoringChatSendMessage = function(message) {
if (!this.CoAuthoringApi) {
return;
} // Error
this.CoAuthoringApi.sendMessage(message);
};
// get chart messages, возвращается массив CChatMessage
spreadsheet_api.prototype.asc_coAuthoringChatGetMessages = function() {
if (!this.CoAuthoringApi) {
return;
} // Error
this.CoAuthoringApi.getMessages();
};
// get users, возвращается массив users
spreadsheet_api.prototype.asc_coAuthoringGetUsers = function() {
if (!this.CoAuthoringApi) {
return;
} // Error
this.CoAuthoringApi.getUsers();
};
// server disconnect
spreadsheet_api.prototype.asc_coAuthoringDisconnect = function() {
if (!this.CoAuthoringApi) {
return;
} // Error
this.CoAuthoringApi.disconnect();
};
/////////////////////////////////////////////////////////////////////////
......
......@@ -234,14 +234,7 @@ CChatMessage.prototype.get_Message = function() { return this.Message; };
*/
// Init CoAuthoring
asc_docs_api.prototype._coAuthoringInit = function (fCallback) {
if (!this.CoAuthoringApi) {
g_oIdCounter.Set_Load(false);
this.asyncServerIdEndLoaded ();
fCallback();
return; // Error
}
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.asc_setId("Unknown");
this.User.asc_setUserName("Unknown");
......@@ -572,40 +565,23 @@ asc_docs_api.prototype.sync_CollaborativeChanges = function()
this.asc_fireCallback("asc_onCollaborativeChanges");
};
// Set CoAuthoring server url
asc_docs_api.prototype._coAuthoringSetServerUrl = function (url) {
if (!this.CoAuthoringApi)
return; // Error
this.CoAuthoringApi.set_url(url);
};
// server disconnect
asc_docs_api.prototype.asc_coAuthoringDisconnect = function () {
//Just set viewer mode
this.SetViewMode(true);
//TODO: Uncomment when CoAuthoring will be done
//if (!this.CoAuthoringApi)
// return; // Error
//this.CoAuthoringApi.disconnect();
this.CoAuthoringApi.disconnect();
//Just set viewer mode
this.SetViewMode(true);
};
// send chart message
asc_docs_api.prototype.asc_coAuthoringChatSendMessage = function (message) {
if (!this.CoAuthoringApi)
return; // Error
this.CoAuthoringApi.sendMessage(message);
};
// get chart messages, возвращается массив CChatMessage
asc_docs_api.prototype.asc_coAuthoringChatGetMessages = function () {
if (!this.CoAuthoringApi)
return; // Error
this.CoAuthoringApi.getMessages();
this.CoAuthoringApi.getMessages();
};
// get users, возвращается массив users
asc_docs_api.prototype.asc_coAuthoringGetUsers = function () {
if (!this.CoAuthoringApi)
return; // Error
this.CoAuthoringApi.getUsers();
this.CoAuthoringApi.getUsers();
};
asc_docs_api.prototype.asyncServerIdStartLoaded = function () {
......
......@@ -6,7 +6,6 @@ asc_docs_api.prototype['asc_GetFontThumbnailsPath'] = asc_docs_api.prototype.asc
asc_docs_api.prototype['_coAuthoringInit'] = asc_docs_api.prototype._coAuthoringInit;
asc_docs_api.prototype['pre_Save'] = asc_docs_api.prototype.pre_Save;
asc_docs_api.prototype['sync_CollaborativeChanges'] = asc_docs_api.prototype.sync_CollaborativeChanges;
asc_docs_api.prototype['_coAuthoringSetServerUrl'] = asc_docs_api.prototype._coAuthoringSetServerUrl;
asc_docs_api.prototype['asc_coAuthoringDisconnect'] = asc_docs_api.prototype.asc_coAuthoringDisconnect;
asc_docs_api.prototype['asc_coAuthoringChatSendMessage'] = asc_docs_api.prototype.asc_coAuthoringChatSendMessage;
asc_docs_api.prototype['asc_coAuthoringChatGetMessages'] = asc_docs_api.prototype.asc_coAuthoringChatGetMessages;
......
......@@ -1318,13 +1318,6 @@ asc_docs_api.prototype._coAuthoringSetChanges = function(e, oColor)
asc_docs_api.prototype._coAuthoringInit = function(fCallback)
{
if (!this.CoAuthoringApi) {
g_oIdCounter.Set_Load(false);
this.asyncServerIdEndLoaded ();
fCallback();
return; // Error
}
//Если User не задан, отключаем коавторинг.
if (null == this.User || null == this.User.asc_getId()) {
this.User = new Asc.asc_CUser();
......@@ -1538,28 +1531,20 @@ asc_docs_api.prototype._coAuthoringInit = function(fCallback)
// send chart message
asc_docs_api.prototype.asc_coAuthoringChatSendMessage = function(message)
{
if (!this.CoAuthoringApi)
return; // Error
this.CoAuthoringApi.sendMessage(message);
this.CoAuthoringApi.sendMessage(message);
};
// get chart messages, возвращается массив CChatMessage
asc_docs_api.prototype.asc_coAuthoringChatGetMessages = function()
{
if (!this.CoAuthoringApi)
return; // Error
this.CoAuthoringApi.getMessages();
this.CoAuthoringApi.getMessages();
};
// get users, возвращается массив users
asc_docs_api.prototype.asc_coAuthoringGetUsers = function()
{
if (!this.CoAuthoringApi)
return; // Error
this.CoAuthoringApi.getUsers();
this.CoAuthoringApi.getUsers();
};
// server disconnect
asc_docs_api.prototype.asc_coAuthoringDisconnect = function () {
if (!this.CoAuthoringApi)
return; // Error
this.CoAuthoringApi.disconnect();
this.isCoAuthoringEnable = false;
......
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