Commit 2146da6e authored by konovalovsergey's avatar konovalovsergey

'meta' command CommandService.ashx, asc_onMeta event

parent af9ccf8c
......@@ -572,6 +572,10 @@
{
t.sendEvent('asc_onError', c_oAscError.ID.Warning, c_oAscError.Level.NoCritical);
};
this.CoAuthoringApi.onMeta = function(data)
{
t.sendEvent('asc_onMeta', data);
};
/**
* Event об отсоединении от сервера
* @param {jQuery} e event об отсоединении с причиной
......
......@@ -49,6 +49,7 @@
this.onParticipantsChanged = options.onParticipantsChanged;
this.onMessage = options.onMessage;
this.onCursor = options.onCursor;
this.onMeta = options.onMeta;
this.onLocksAcquired = options.onLocksAcquired;
this.onLocksReleased = options.onLocksReleased;
this.onLocksReleasedEnd = options.onLocksReleasedEnd; // ToDo переделать на массив release locks
......@@ -84,6 +85,9 @@
this._CoAuthoringApi.onCursor = function(e) {
t.callback_OnCursor(e);
};
this._CoAuthoringApi.onMeta = function(e) {
t.callback_OnMeta(e);
};
this._CoAuthoringApi.onLocksAcquired = function(e) {
t.callback_OnLocksAcquired(e);
};
......@@ -343,6 +347,12 @@
}
};
CDocsCoApi.prototype.callback_OnMeta = function(e) {
if (this.onMeta) {
this.onMeta(e);
}
};
CDocsCoApi.prototype.callback_OnLocksAcquired = function(e) {
if (this.onLocksAcquired) {
this.onLocksAcquired(e);
......@@ -456,6 +466,7 @@
this.onParticipantsChanged = options.onParticipantsChanged;
this.onMessage = options.onMessage;
this.onCursor = options.onCursor;
this.onMeta = options.onMeta;
this.onLocksAcquired = options.onLocksAcquired;
this.onLocksReleased = options.onLocksReleased;
this.onLocksReleasedEnd = options.onLocksReleasedEnd; // ToDo переделать на массив release locks
......@@ -821,6 +832,12 @@
}
};
DocsCoApi.prototype._onMeta = function(data) {
if (data["messages"] && this.onMeta) {
this.onMeta(data["messages"]);
}
};
DocsCoApi.prototype._onGetLock = function(data) {
if (data["locks"]) {
for (var key in data["locks"]) {
......@@ -1287,6 +1304,9 @@
case 'cursor' :
t._onCursor(dataObject);
break;
case 'meta' :
t._onMeta(dataObject);
break;
case 'getLock' :
t._onGetLock(dataObject);
break;
......
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