Class Index | Minimal

Classes


Class jabberwerx.ui.ChatView


Extends jabberwerx.ui.JWView.

A view for a single 1-1 chat pane. This allows the user to send and receive messages from the user of the given session.

Class Summary
Constructor Attributes Constructor Name and Description
 

Creates a new ChatView with the given session.

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

Clears the MessageHistory pane.

 
createDOM(doc)

Creates the DOM for a ChatView which contains a ContactPresenceView, a MessageHistory and a TextInput widget.

 

Destroys this ChatView.

 

Clears out all of the objects creates by createDOM.

 
height(h, noupdate)

Retrieves or changes the height of this view.

 

Restore the DOM for a ChatView which contains a ContactPresenceView, a MessageHistory and a TextInput widget.

 

Sets or clears the tab control.

 

Triggers an update of this ChatView.

 
width(w, noupdate)

Retrieves or changes the width of this view.

Methods borrowed from class jabberwerx.ui.JWView:
dimensions, hide, parent, persistOptions, remove, render, restoreRender, restoreUpdate, shouldBeSavedWithGraph, show, wasUnserialized, 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.ChatView(session)

Creates a new ChatView with the given session.

Parameters:
{jabberwerx.ChatSession} session
The session associated with this chat view.

This class provides the following events:

Throws:
{TypeError}
if {session} is not valid
Method Detail
clearHistory()

Clears the MessageHistory pane.


{jQuery} createDOM(doc)

Creates the DOM for a ChatView which contains a ContactPresenceView, a MessageHistory and a TextInput widget.

Parameters:
{Document} doc
The document to use for creating content.
Returns:
{jQuery} The element containing the view.

destroy()

Destroys this ChatView. This unbinds all of the bound events this object has.


destroyDOM()

Clears out all of the objects creates by createDOM.


{Number|jabberwerx.ui.JWView} height(h, noupdate)

Retrieves or changes the height of this view. This implementation extends the superclass to adjust the content and tablist to match the new height.

Parameters:
{Number|String} h Optional
The new height (or undefined to retrieve the current height)
{Boolean} noupdate Optional
true if the view should NOT be updated
Returns:
{Number|jabberwerx.ui.JWView} The current height (if retrieving); or this jabberwerx.ui.JWView (if changing)
See:
jabberwerx.ui.JWView#height

{jQuery} restoreDOM(doc)

Restore the DOM for a ChatView which contains a ContactPresenceView, a MessageHistory and a TextInput widget.

Parameters:
{Document} doc
The document to use for creating content.
Returns:
{jQuery} The element containing the view.

setTabControl(tab)

Sets or clears the tab control. This method overrides the mixin jabberwerx.ui.Tabbable#setTabControl to set the label, and bind events for updating when this ChatView's session's entity changes.

Parameters:
{jabberwerx.ui.TabbedView.Tab} tab Optional
The new tab, or null if being removed from a tabbed view.

update()

Triggers an update of this ChatView. This goes through all of the widgets associated with this view and calls their updates.


{Number|jabberwerx.ui.JWView} width(w, noupdate)

Retrieves or changes the width of this view. This implementation extends the superclass to adjust the content and tablist to match the new width.

Parameters:
{Number|String} w Optional
The new width (or undefined to retrieve the current width)
{Boolean} noupdate Optional
true if the view should NOT be updated
Returns:
{Number|jabberwerx.ui.JWView} The current width (if retrieving); or this jabberwerx.ui.JWView (if changing)
See:
jabberwerx.ui.JWView#width

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