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