Class Index | Minimal

Classes


Class jabberwerx.ui.MessageView


Extends jabberwerx.ui.JWView.

The view behind a single message in a list of messages.

This class provides the following events:

Class Summary
Constructor Attributes Constructor Name and Description
 

Creates a new jabberwerx.ui.Message with the given data.

Field Summary
Field Attributes Field Name and Description
 

The message content.

 

The message CSS class, if any

 

The display name of the sender.

 

The timestamp of this message, in a displayable string.

Fields borrowed from class jabberwerx.ui.JWView:
jq
Method Summary
Method Attributes Method Name and Description
 
createDOM(doc)

Creates the DOM representation of this MessageView.

<inner>  
replace(val)
Methods borrowed from class jabberwerx.ui.JWView:
destroy, destroyDOM, dimensions, height, hide, parent, persistOptions, remove, render, restoreDOM, restoreRender, restoreUpdate, shouldBeSavedWithGraph, show, update, wasUnserialized, width, willBeSerialized
Methods borrowed from class jabberwerx.JWModel:
applyEvent, event
Methods borrowed from class jabberwerx.JWBase:
getClassName, graphUnserialized, init, invocation, shouldBeSerializedInline, toString
Class Detail
jabberwerx.ui.MessageView(data)

Creates a new jabberwerx.ui.Message with the given data.

Parameters:
{Object} data
The data for the message
{Date} data.timestamp
The message timestamp
{String} data.displayName
The displayName of the sender
{String|Element} data.content
The message content.
{String} data.cssClassName Optional
The CSS class for this message
Field Detail
{jQuery} content

The message content.


{String} cssClassName

The message CSS class, if any


{String} displayName

The display name of the sender.


{String} timestamp

The timestamp of this message, in a displayable string.

Method Detail
{Element} createDOM(doc)

Creates the DOM representation of this MessageView. This implementation constructs the given fragment:

<div class='{cssClassName}'>
  <span class='time'>{timestamp}</span>
  <span class='message'><b> {displayName}:</b> {content}
</div>
Parameters:
{Document} doc
The document to use for creating content
Returns:
{Element} The generated element to display

<inner> replace(val)
Parameters:
val

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Apr 02 2014 13:23:43 GMT-0600 (MDT)