Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
2146da6e
Commit
2146da6e
authored
Sep 20, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'meta' command CommandService.ashx, asc_onMeta event
parent
af9ccf8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
common/apiBase.js
common/apiBase.js
+4
-0
common/docscoapi.js
common/docscoapi.js
+20
-0
No files found.
common/apiBase.js
View file @
2146da6e
...
...
@@ -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 об отсоединении с причиной
...
...
common/docscoapi.js
View file @
2146da6e
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment