Boards Comments Functions
Each of these functions require the <commentsbutton /> tag to be present on the view. The button does not have to be visible to the user but it must be present in the view HTML. See <commentsbutton> for details.
OpenDrawer
| OpenDrawer | |
|---|---|
| No parameters |
Opens the comments drawer slide out panel for the current view. This feature is available in WebEOC Nexus 10.18 and later. |
Example
<script>
BoardScript.Comments.OpenDrawer();
</script>
CloseDrawer
| CloseDrawer | |
|---|---|
| No parameters |
Closes the comments drawer slide out UI for the current view. This feature is available in WebEOC Nexus 10.18 and later. |
Example
<script>
BoardScript.Comments.CloseDrawer();
</script>
GetUnreadCount
| GetUnreadCount | ||
|---|---|---|
| callback | #optional |
Get the unread comment count for the current view/user. Result can be received via callback or async/await Promise return. This feature is available in WebEOC Nexus 10.18 and later. |
Example
<script>
// callback
BoardScript.Comments.GetUnreadCount(function (count) {
console.log('Unread count is:', count);
});
// async/await
const count = await BoardScript.Comments.GetUnreadCount();
console.log('Unread count is:', count);
</script>
GetCountsByName
Get the comment counts for a user by specifying a board, view. or dataid.
| GetCounts | ||
|---|---|---|
| args | #optional |
Single parameter arguments object for specifying board/view/dataid. Copy Code
This feature is available in WebEOC Nexus 10.19 and later. |
| callback | #optional | Result can be received via callback or async/await Promise return. |
Example
<script>
// callback
BoardScript.Comments.GetCounts(function (countsObject) {
console.log('Unread count is:', countsObject.unreadCount);
console.log('Total count is:', countsObject.totalCount);
});
// async/await
const countsObject = await BoardScript.Comments.GetCounts();
console.log('Unread count is:', countsObject.unreadCount);
console.log('Total count is:', countsObject.totalCount);
</script>
GetCounts
| GetCounts | ||
|---|---|---|
| callback | #optional |
Get the comment count for the current view/user. Result can be received via callback or async/await Promise return. This feature is available in WebEOC Nexus 10.18 and later. |
Example
<script>
// callback
BoardScript.Comments.GetCounts(function (countsObject) {
console.log('Unread count is:', countsObject.unreadCount);
console.log('Total count is:', countsObject.totalCount);
});
// async/await
const countsObject = await BoardScript.Comments.GetCounts();
console.log('Unread count is:', countsObject.unreadCount);
console.log('Total count is:', countsObject.totalCount);
</script>