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.
Constructor Attributes | Constructor Name and Description |
---|---|
jabberwerx.ui.ChatView(session)
Creates a new ChatView with the given session. |
- Fields borrowed from class jabberwerx.ui.JWView:
- jq
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. |
|
destroy()
Destroys this ChatView. |
|
Clears out all of the objects creates by createDOM. |
|
height(h, noupdate)
Retrieves or changes the height of this view. |
|
restoreDOM(doc)
Restore the DOM for a ChatView which contains a ContactPresenceView, a MessageHistory and a TextInput widget. |
|
setTabControl(tab)
Sets or clears the tab control. |
|
update()
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
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
Clears the MessageHistory pane.
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.
Destroys this ChatView. This unbinds all of the bound events this object has.
Clears out all of the objects creates by createDOM.
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)
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.
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.
Triggers an update of this ChatView. This goes through all of the widgets associated with this view and calls their updates.
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)