Class Index | File Index

Classes


Class Alfresco.CommentsList

Extends Alfresco.component.Base
CommenstList component.

Displays a list of comments and a editor for creating new ones.
Defined in: comments-list.js
Constructor Summary
Constructor Attributes Constructor Name and Description
 
CommentsList constructor.
Field Summary
Field Attributes Field Name and Description
 
Tells whether an action is currently ongoing.
 
Flag indicating location.hash has been checked
 
Object container for initialization options
Fields borrowed from class Alfresco.component.Base:
modules, services, widgets
Method Summary
Method Attributes Method Name and Description
 
deleteComment(comment)
Will delete the comment.
 
formMarkup(rowId, userName, comment)
Creates and returns the markup for a comment form
 
handlePermissions(oRequest, oFullResponse)
Update UI to reflect current user's permissions
 
Called when the "onAddCommentClick" button has been clicked.
 
onCommentNode(event, args)
Event handler called when another component wants to comment a nodeRef
 
Called when the "onConfirmDeleteCommentClick" link was clicked.
 
Called when the "onEditCommentClick" button was clicked.
 
Event handler called once editor is ready for use
 
Fired by YUI when parent element is available for scripting.
 
renderCellComment(elCell, oRecord, oColumn, oData)
Renders a comment inside a cell
 
Restore UI after an edit operation
 
Sets up the form for adding comments
 
setupCommentForm(rowId, nodeRef, editMode)
Sets up a form for a given domid
 
Sets up the datatable to list comments
 
synchronizeElements(syncEl, sourceEl)
Helper function to position DOM elements
Methods borrowed from class Alfresco.component.Base:
attachLinkClickListeners, bind, createYUIButtons, destroy, fire, invokeAction, msg, onComponentLoaded, onComponentsLoaded, onReadyWrapper, refresh, setMessages, setOptions
Constructor Detail
Alfresco.CommentsList(htmlId)
CommentsList constructor.
Parameters:
{String} htmlId
The HTML id of the parent element
Returns:
{Alfresco.CommentsList} The new Comment instance
Field Detail
{boolean} busy
Tells whether an action is currently ongoing.
See:
_setBusy/_releaseBusy

{boolean} hashChecked
Flag indicating location.hash has been checked

{object} options
Object container for initialization options
Method Detail
deleteComment(comment)
Will delete the comment.
Parameters:
comment

formMarkup(rowId, userName, comment)
Creates and returns the markup for a comment form
Parameters:
{string} rowId
Uniqiue dom id
{string} userName
The username whose avatar should be displayed
{string} comment
The actual comment

handlePermissions(oRequest, oFullResponse)
Update UI to reflect current user's permissions
Parameters:
oRequest
oFullResponse

onAddCommentClick()
Called when the "onAddCommentClick" button has been clicked.
Will display the add comment form.

onCommentNode(event, args)
Event handler called when another component wants to comment a nodeRef
Parameters:
event
args

onConfirmDeleteCommentClick(recordId)
Called when the "onConfirmDeleteCommentClick" link was clicked.
Will display a confirmation dialog befpre deleting the comment.
Parameters:
recordId

onEditCommentClick(recordId)
Called when the "onEditCommentClick" button was clicked.
Will display an inline edit comment form.
Parameters:
recordId

onEditorInitialized()
Event handler called once editor is ready for use

onReady()
Fired by YUI when parent element is available for scripting.
Component initialisation, including instantiation of YUI widgets and event listener binding.

renderCellComment(elCell, oRecord, oColumn, oData)
Renders a comment inside a cell
Parameters:
elCell
oRecord
oColumn
oData

restoreEditForm()
Restore UI after an edit operation

setupAddCommentForm()
Sets up the form for adding comments

setupCommentForm(rowId, nodeRef, editMode)
Sets up a form for a given domid
Parameters:
{string} rowId
The dom id in which the comment widgets are placed
{string} nodeRef
The comments id/nodeRef
{string} editMode
Set to true oif form shall be rendered in edit mode, false is create mode

setupCommentList()
Sets up the datatable to list comments

synchronizeElements(syncEl, sourceEl)
Helper function to position DOM elements
Parameters:
syncEl
sourceEl

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