Class Alfresco.CommentList
Extends Alfresco.component.Base
CommentList component.
Displays a list of comments.
Displays a list of comments.
Defined in: commentlist.js
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Alfresco.CommentList(htmlId)
CommentList constructor.
|
| Field Attributes | Field Name and Description |
|---|---|
|
Tells whether an action is currently ongoing.
|
|
|
Comments data
|
|
|
Object containing data about the currently edited
|
|
|
Object container for initialization options
|
- Fields borrowed from class Alfresco.component.Base:
- modules, services, widgets
| Method Attributes | Method Name and Description |
|---|---|
|
loadCommentsSuccess(response)
Load comments ajax request success handler.
|
|
|
onCommentElementMouseEntered(layer, args)
Mouse enter event handler for list items
|
|
|
onCommentElementMouseExited(layer, args)
Mouse leave event handler for list items
|
|
|
onDeleteComment(row)
Delete comment action links handler.
|
|
|
onEditComment(row)
Edit comment action links handler.
|
|
|
Form cancel button click handler
|
|
|
onEditFormSubmitFailure(response)
Edit form submit failure handler
|
|
|
onEditFormSubmitSuccess(response)
Edit form submit success handler
|
|
|
onFormLoaded(response, obj)
Event callback when comment form has been loaded
|
|
|
onPaginatorChange(state)
Called by the paginator when a user has clicked on next or prev.
|
|
|
onReady()
Fired by YUI when parent element is available for scripting.
|
|
|
onRefreshComments(layer, args)
Forces the comments list to fresh by reloading the data from the server
|
|
|
onSetCommentedNode(layer, args)
Called by another component to set the node for which comments should be displayed
|
|
|
renderComment(index, data)
Renders a comment element.
|
|
|
renderCommentView(index, data)
Renders the content of the comment view div.
|
- Methods borrowed from class Alfresco.component.Base:
- attachLinkClickListeners, bind, createYUIButtons, destroy, fire, invokeAction, msg, onComponentLoaded, onComponentsLoaded, onReadyWrapper, refresh, setMessages, setOptions
Constructor Detail
Alfresco.CommentList(htmlId)
CommentList constructor.
- Parameters:
- {String} htmlId
- The HTML id of the parent element
- Returns:
- {Alfresco.CommentList} The new Comment instance
Field Detail
{boolean}
busy
Tells whether an action is currently ongoing.
- See:
- _setBusy/_releaseBusy
commentsData
Comments data
editData
Object containing data about the currently edited
comment.
comment.
{object}
options
Object container for initialization options
Method Detail
loadCommentsSuccess(response)
Load comments ajax request success handler.
- Parameters:
- response
- AJAX response object
onCommentElementMouseEntered(layer, args)
Mouse enter event handler for list items
- Parameters:
- {object} layer
- Event fired (unused)
- {array} args
- Event parameters (target)
onCommentElementMouseExited(layer, args)
Mouse leave event handler for list items
- Parameters:
- {object} layer
- Event fired (unused)
- {array} args
- Event parameters (target)
onDeleteComment(row)
Delete comment action links handler.
- Parameters:
- {object} row
- Comment to delete
onEditComment(row)
Edit comment action links handler.
- Parameters:
- {object} row
- Comment to edit
onEditFormCancelButtonClick()
Form cancel button click handler
onEditFormSubmitFailure(response)
Edit form submit failure handler
- Parameters:
- {object} response
- Ajax response object
onEditFormSubmitSuccess(response)
Edit form submit success handler
- Parameters:
- {object} response
- Ajax response object
onFormLoaded(response, obj)
Event callback when comment form has been loaded
- Parameters:
- {object} response
- Server response from load form XHR request
- {object} obj
- Comment scope (row, data, formId)
onPaginatorChange(state)
Called by the paginator when a user has clicked on next or prev.
Dispatches a call to the server and reloads the comment list.
Dispatches a call to the server and reloads the comment list.
- Parameters:
- {object} state
- An object describing the required page changing
onReady()
Fired by YUI when parent element is available for scripting.
Component initialisation, including instantiation of YUI widgets and event listener binding.
Component initialisation, including instantiation of YUI widgets and event listener binding.
onRefreshComments(layer, args)
Forces the comments list to fresh by reloading the data from the server
- Parameters:
- {object} layer
- Event fired (unused)
- {array} args
- Event parameters (reason)
onSetCommentedNode(layer, args)
Called by another component to set the node for which comments should be displayed
- Parameters:
- {object} layer
- Event fired (unused)
- {array} args
- Event parameters (nodeRef, title, page, pageParams)
renderComment(index, data)
Renders a comment element.
Each comment element consists of an edit and a view div.
Each comment element consists of an edit and a view div.
- Parameters:
- {int} index
- Comment DOM index
- {object} data
- Comment data
renderCommentView(index, data)
Renders the content of the comment view div.
- Parameters:
- {int} index
- Comment DOM index
- {object} data
- Comment data