Class Index | Minimal

Classes


Class jabberwerx.ui.ContactPresenceView


Extends jabberwerx.ui.JWView.

View for displaying a contact's presence.

The view shows the following info for an entity:

  1. presence icon: Icon showing presence state
  2. display name: The display name for the entity
  3. presence status: Optional presence status message

This class provides the following events:

Class Summary
Constructor Attributes Constructor Name and Description
 

Creates a new ContactPresenceView with the given entity.

Field Summary
Field Attributes Field Name and Description
 

The client to montior and affect for presence changes.

<static>  
jabberwerx.ui.ContactPresenceView.show_status

The mapping of default show value to display text.

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

Creates the DOM to display.

 

Restore the DOM to display.

 

Updates the display for this ContactPresenceView

Methods borrowed from class jabberwerx.ui.JWView:
destroy, destroyDOM, dimensions, height, hide, parent, persistOptions, remove, render, restoreRender, restoreUpdate, 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
Class Detail
jabberwerx.ui.ContactPresenceView(entity, delegate)

Creates a new ContactPresenceView with the given entity.

The {delegate} is used to indicate updates to this view are handled by the delegate object, and not by this view directly.

Parameters:
{jabberwerx.Entity} entity
The entity to view presence for
{Object} delegate Optional
The delegate for this view
Throws:
{TypeError}
If {entity} is not a jabberwerx.Entity
Field Detail
{jabberwerx.Client} entity

The client to montior and affect for presence changes.


<static> jabberwerx.ui.ContactPresenceView.show_status

The mapping of default show value to display text. The choices are:

{
 "chat":"Ready to Chat!",
 "available":"Available",
 "away": "Away",
 "xa": "Extended Away"
 "dnd": "Do Not Disturb",
 "unavailable": "Offline",
 "unknown": "Unknown"
}
Method Detail
{Element} createDOM(doc)

Creates the DOM to display. This method creates the following DOM:

<div class="jabberwerx contact presence show">
     <a class="contactlink"/>
         <span class="displayname">{entity.getDisplayName()}</span>
     <span class="status"/>
</div>
Parameters:
{Document} doc
The document to use for creating content.
Returns:
{Element} The generated element to display

{Element} restoreDOM(doc)

Restore the DOM to display.

Parameters:
{Document} doc
The document to use for creating content
Returns:
{Element} The generated element to display

{Boolean} update()

Updates the display for this ContactPresenceView

Returns:
{Boolean} true if this ContactPresenceView is updatable

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