Class jabberwerx.ui.MessageHistory
Extends
jabberwerx.ui.JWView.
A MessageHistory widget is a GUI mechanism to display past messages for a given View.
This class provides the following events:
Constructor Attributes | Constructor Name and Description |
---|---|
Creates a new MessageHistory. |
- Fields borrowed from class jabberwerx.ui.JWView:
- jq
Method Attributes | Method Name and Description |
---|---|
addMessage(entity, msg)
Adds a message to the MessageHistory widget. |
|
Clears out all of the messages in this widget. |
|
createDOM(doc)
Creates the DOM for the MessageHistory widget. |
|
Restores the size of the widget to display correctly. |
|
setBadge(data)
Changes or removes the badge for this MessageHistory. |
|
update()
This adjusts the size of the widget to display correctly. |
- Methods borrowed from class jabberwerx.ui.JWView:
- destroy, destroyDOM, dimensions, height, hide, parent, persistOptions, remove, render, restoreDOM, restoreRender, shouldBeSavedWithGraph, show, wasUnserialized, width, willBeSerialized
- Methods borrowed from class jabberwerx.JWModel:
- applyEvent, event
- Methods borrowed from class jabberwerx.JWBase:
- getClassName, graphUnserialized, init, invocation, shouldBeSerializedInline, toString
Adds a message to the MessageHistory widget.
- Parameters:
- {jabberwerx.Entity} entity Optional
- The entity associated with the message.
- {jabberwerx.Stanza} msg Optional
- The message to be added to this widget.
Clears out all of the messages in this widget.
Creates the DOM for the MessageHistory widget.
- Parameters:
- {Document} doc Optional
- The document to use for creating content.
- Returns:
- {jQuery} The element containing the newly created content.
Restores the size of the widget to display correctly.
- Returns:
- Always true
Changes or removes the badge for this MessageHistory. The badge is extra state information to alert the user to (e.g. chat state changes).
- Parameters:
- {String|jQuery|Element|null} data Optional
- The badge data, or null to remove badge
This adjusts the size of the widget to display correctly.
- Returns:
- false if inherited returned false (if update was called before DOM has been created)