Commit 8ee6bf97 authored by Alexander.Trofimov's avatar Alexander.Trofimov

Ввел понятие версии для совместного редактирования (если версия sdk не та, то не соединяемся).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56727 954022d7-b5bf-4e40-9824-e11837661b57
parent bdb894cf
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
var asc = window["Asc"]; var asc = window["Asc"];
var asc_user = asc.asc_CUser; var asc_user = asc.asc_CUser;
var asc_coAuthV = '3.0.0';
// Класс надстройка, для online и offline работы // Класс надстройка, для online и offline работы
var CDocsCoApi = function (options) { var CDocsCoApi = function (options) {
...@@ -747,7 +748,7 @@ ...@@ -747,7 +748,7 @@
DocsCoApi.prototype._onDrop = function (data) { DocsCoApi.prototype._onDrop = function (data) {
this.disconnect(); this.disconnect();
this.onDisconnect(data['description'], true, this.isCloseCoAuthoring); this.onDisconnect(data['description'], true, false);
}; };
DocsCoApi.prototype._onAuth = function (data) { DocsCoApi.prototype._onAuth = function (data) {
...@@ -858,7 +859,8 @@ ...@@ -858,7 +859,8 @@
"path":t._serverPath "path":t._serverPath
}, },
"documentFormatSave": t._documentFormatSave, "documentFormatSave": t._documentFormatSave,
"isViewer": t._isViewer "isViewer": t._isViewer,
"version": asc_coAuthV
}); });
}; };
...@@ -879,6 +881,7 @@ ...@@ -879,6 +881,7 @@
case 'savePartChanges' : t._onSavePartChanges(); break; case 'savePartChanges' : t._onSavePartChanges(); break;
case 'drop' : t._onDrop(dataObject); break; case 'drop' : t._onDrop(dataObject); break;
case 'waitAuth' : /*Ждем, когда придет auth, документ залочен*/break; case 'waitAuth' : /*Ждем, когда придет auth, документ залочен*/break;
case 'error' : /*Старая версия sdk*/t._onDrop(dataObject); break;
} }
}; };
sockjs.onclose = function (evt) { sockjs.onclose = function (evt) {
......
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