Class Index | File Index

Classes


Class Alfresco.CommentList

Extends Alfresco.component.Base
CommentList component.

Displays a list of comments.
Defined in: commentlist.js
Constructor Summary
Constructor Attributes Constructor Name and Description
 
CommentList constructor.
Field Summary
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 Summary
Method Attributes Method Name and Description
 
Load comments ajax request success handler.
 
Mouse enter event handler for list items
 
Mouse leave event handler for list items
 
Delete comment action links handler.
 
Edit comment action links handler.
 
Form cancel button click handler
 
Edit form submit failure handler
 
Edit form submit success handler
 
onFormLoaded(response, obj)
Event callback when comment form has been loaded
 
Called by the paginator when a user has clicked on next or prev.
 
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.

{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.
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.

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.
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

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Feb 16 2012 12:24:23 GMT-0000 (GMT)