Commit 6a927ec6 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Добавил warning на подписку на callback сервера. В ответе должна быть информация error: 0.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64824 954022d7-b5bf-4e40-9824-e11837661b57
parent ced77375
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
this.onLocksReleased = options.onLocksReleased; this.onLocksReleased = options.onLocksReleased;
this.onLocksReleasedEnd = options.onLocksReleasedEnd; // ToDo переделать на массив release locks this.onLocksReleasedEnd = options.onLocksReleasedEnd; // ToDo переделать на массив release locks
this.onDisconnect = options.onDisconnect; this.onDisconnect = options.onDisconnect;
this.onWarning = options.onWarning;
this.onFirstLoadChangesEnd = options.onFirstLoadChangesEnd; this.onFirstLoadChangesEnd = options.onFirstLoadChangesEnd;
this.onConnectionStateChanged = options.onConnectionStateChanged; this.onConnectionStateChanged = options.onConnectionStateChanged;
this.onSetIndexUser = options.onSetIndexUser; this.onSetIndexUser = options.onSetIndexUser;
...@@ -56,6 +57,9 @@ ...@@ -56,6 +57,9 @@
this._CoAuthoringApi.onDisconnect = function(e, isDisconnectAtAll, isCloseCoAuthoring) { this._CoAuthoringApi.onDisconnect = function(e, isDisconnectAtAll, isCloseCoAuthoring) {
t.callback_OnDisconnect(e, isDisconnectAtAll, isCloseCoAuthoring); t.callback_OnDisconnect(e, isDisconnectAtAll, isCloseCoAuthoring);
}; };
this._CoAuthoringApi.onWarning = function(e) {
t.callback_OnWarning(e);
};
this._CoAuthoringApi.onFirstLoadChangesEnd = function() { this._CoAuthoringApi.onFirstLoadChangesEnd = function() {
t.callback_OnFirstLoadChangesEnd(); t.callback_OnFirstLoadChangesEnd();
}; };
...@@ -297,6 +301,12 @@ ...@@ -297,6 +301,12 @@
} }
}; };
CDocsCoApi.prototype.callback_OnWarning = function(e) {
if (this.onWarning) {
this.onWarning(e);
}
};
CDocsCoApi.prototype.callback_OnFirstLoadChangesEnd = function() { CDocsCoApi.prototype.callback_OnFirstLoadChangesEnd = function() {
if (this.onFirstLoadChangesEnd) { if (this.onFirstLoadChangesEnd) {
this.onFirstLoadChangesEnd(); this.onFirstLoadChangesEnd();
...@@ -368,6 +378,7 @@ ...@@ -368,6 +378,7 @@
this.onLocksReleasedEnd = options.onLocksReleasedEnd; // ToDo переделать на массив release locks this.onLocksReleasedEnd = options.onLocksReleasedEnd; // ToDo переделать на массив release locks
this.onRelockFailed = options.onRelockFailed; this.onRelockFailed = options.onRelockFailed;
this.onDisconnect = options.onDisconnect; this.onDisconnect = options.onDisconnect;
this.onWarning = options.onWarning;
this.onSaveChanges = options.onSaveChanges; this.onSaveChanges = options.onSaveChanges;
this.onFirstLoadChangesEnd = options.onFirstLoadChangesEnd; this.onFirstLoadChangesEnd = options.onFirstLoadChangesEnd;
this.onConnectionStateChanged = options.onConnectionStateChanged; this.onConnectionStateChanged = options.onConnectionStateChanged;
...@@ -1006,6 +1017,10 @@ ...@@ -1006,6 +1017,10 @@
this.onDisconnect(data ? data['description'] : '', true, this.isCloseCoAuthoring); this.onDisconnect(data ? data['description'] : '', true, this.isCloseCoAuthoring);
}; };
DocsCoApi.prototype._onWarning = function(data) {
this.onWarning(data ? data['description'] : '');
};
DocsCoApi.prototype._onAuth = function(data) { DocsCoApi.prototype._onAuth = function(data) {
var t = this; var t = this;
if (true === this._isAuth) { if (true === this._isAuth) {
...@@ -1191,6 +1206,9 @@ ...@@ -1191,6 +1206,9 @@
case 'documentOpen' : case 'documentOpen' :
t._documentOpen(dataObject); t._documentOpen(dataObject);
break; break;
case 'warning':
t._onWarning(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