Commit eab430d5 authored by Sergey Konovalov's avatar Sergey Konovalov Committed by GitHub

Merge pull request #20 from ONLYOFFICE/release/3.8.1

Release/3.8.1
parents 91479e4c 0e51621e
......@@ -4,7 +4,8 @@ var g_oLicenseResult = {
Error : 1,
Expired : 2,
Success : 3,
UnknownUser : 4
UnknownUser : 4,
Connections : 5
};
var g_sLicenseDefaultUrl = "/license";
......
......@@ -347,7 +347,7 @@
this.sendEvent("asc_onPrint");
};
// Open
baseEditorsApi.prototype.asc_LoadDocument = function(isVersionHistory)
baseEditorsApi.prototype.asc_LoadDocument = function(isVersionHistory, isRepeat)
{
// Меняем тип состояния (на открытие)
this.advancedOptionsAction = AscCommon.c_oAscAdvancedOptionsAction.Open;
......@@ -373,7 +373,9 @@
}
this.CoAuthoringApi.auth(this.getViewMode(), rData);
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
if (!isRepeat) {
this.sync_StartAction(c_oAscAsyncActionType.BlockInteraction, c_oAscAsyncAction.Open);
}
if (offlineMode === this.documentUrl)
{
......@@ -513,7 +515,12 @@
{
if (t.isOnFirstConnectEnd)
{
t.CoAuthoringApi.auth(t.getViewMode());
if (t.CoAuthoringApi.get_isAuth()) {
t.CoAuthoringApi.auth(t.getViewMode());
} else {
//первый запрос или ответ не дошел надо повторить открытие
t.asc_LoadDocument(false, true);
}
}
else
{
......
......@@ -268,6 +268,13 @@
return null;
};
CDocsCoApi.prototype.get_isAuth = function() {
if (this._CoAuthoringApi && this._onlineWork) {
return this._CoAuthoringApi.get_isAuth();
}
return null;
};
CDocsCoApi.prototype.releaseLocks = function(blockId) {
if (this._CoAuthoringApi && this._onlineWork) {
this._CoAuthoringApi.releaseLocks(blockId);
......@@ -514,6 +521,10 @@
return this._indexUser;
};
DocsCoApi.prototype.get_isAuth = function() {
return this._isAuth
};
DocsCoApi.prototype.getSessionId = function() {
return this._id;
};
......
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