Commit e7507a2a authored by Alexey.Musinov's avatar Alexey.Musinov

Merge branch 'develop' of https://github.com/ONLYOFFICE/sdkjs into develop

parents 2793929b 141894d8
...@@ -198,6 +198,9 @@ baseEditorsApi.prototype.asc_setDocInfo = function(oDocInfo) { ...@@ -198,6 +198,9 @@ baseEditorsApi.prototype.asc_setDocInfo = function(oDocInfo) {
this.User = new AscCommon.asc_CUser(); this.User = new AscCommon.asc_CUser();
this.User.setId(this.DocInfo.get_UserId()); this.User.setId(this.DocInfo.get_UserId());
this.User.setUserName(this.DocInfo.get_UserName()); this.User.setUserName(this.DocInfo.get_UserName());
//чтобы в versionHistory был один documentId для auth и open
this.CoAuthoringApi.setDocId(this.documentId);
} }
if (undefined !== window["AscDesktopEditor"] && offlineMode != this.documentUrl) { if (undefined !== window["AscDesktopEditor"] && offlineMode != this.documentUrl) {
......
...@@ -144,6 +144,11 @@ ...@@ -144,6 +144,11 @@
} }
return undefined; return undefined;
}; };
CDocsCoApi.prototype.setDocId = function(docId) {
if (this._CoAuthoringApi) {
return this._CoAuthoringApi.setDocId(docId)
}
};
CDocsCoApi.prototype.auth = function(isViewer, opt_openCmd) { CDocsCoApi.prototype.auth = function(isViewer, opt_openCmd) {
if (this._CoAuthoringApi && this._onlineWork) { if (this._CoAuthoringApi && this._onlineWork) {
...@@ -1184,6 +1189,10 @@ ...@@ -1184,6 +1189,10 @@
DocsCoApi.prototype.getDocId = function() { DocsCoApi.prototype.getDocId = function() {
return this._docid; return this._docid;
}; };
DocsCoApi.prototype.setDocId = function(docId) {
//todo возможно надо менять sockjs_url
this._docid = docId;
};
// Авторизация (ее нужно делать после выставления состояния редактора view-mode) // Авторизация (ее нужно делать после выставления состояния редактора view-mode)
DocsCoApi.prototype.auth = function(isViewer, opt_openCmd) { DocsCoApi.prototype.auth = function(isViewer, opt_openCmd) {
this.isAuthInit = true; this.isAuthInit = true;
......
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