Class Index | Minimal

Classes


Class jabberwerx.ui.MUCInviteView


Extends jabberwerx.ui.JWView.

View for accepting or ignoring MUC invites.

This displays the room, invitor, reason and nickname for entering the room with. It also gives the user the choice to join the room or ignore the invite.

An event (actionComplete) will be triggered when an action has been undertaken. The action will have been to either join the room or ignore the invite.

This class provides the following events:

Class Summary
Constructor Attributes Constructor Name and Description
 
jabberwerx.ui.MUCInviteView(muc, mucInvite, nickname)

Creates a MUCInviteView object.

Field Summary
Field Attributes Field Name and Description
<static>  
jabberwerx.ui.MUCInviteView.ACTION_IGNORE

Returned as part of the event object in the actionComplete event when ignore is the action which has been taken.

<static>  
jabberwerx.ui.MUCInviteView.ACTION_JOIN

Returned as part of the event object in the actionComplete event when join is the action which has been taken.

 
muc

The muc controller object used to join the room.

 

The invite used to populate the information fields.

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

Creates the DOM to display.

 
hide()

Hides the form in the document.

 

Ignore the invite.

 

Join the room to which the invite has been received.

 
show()

Shows the form if hidden in the document.

Methods borrowed from class jabberwerx.ui.JWView:
destroy, destroyDOM, dimensions, height, parent, persistOptions, remove, render, restoreDOM, restoreRender, restoreUpdate, shouldBeSavedWithGraph, 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.MUCInviteView(muc, mucInvite, nickname)

Creates a MUCInviteView object.

Parameters:
{jabberwerx.MUCController} muc
The MUCController
{jabberwerx.MUCInvite} mucInvite
The muc invite for which this view is been created.
{String} nickname Optional
Used to initialise the nickname element text element
Throws:
{TypeError}
If muc or mucInvite are not valid
Field Detail
<static> {String} jabberwerx.ui.MUCInviteView.ACTION_IGNORE

Returned as part of the event object in the actionComplete event when ignore is the action which has been taken.


<static> {String} jabberwerx.ui.MUCInviteView.ACTION_JOIN

Returned as part of the event object in the actionComplete event when join is the action which has been taken.


muc

The muc controller object used to join the room.


mucInvite

The invite used to populate the information fields.

Method Detail
{Element} createDOM(doc)

Creates the DOM to display.

Binds the input elements to their respective action methods.

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

<div class="jabberwerx muc_invite_view">
     <div class="room_div">
         <label for="room">Room:</label>
         <span class="room" id="room">mucInvite.room</span>
     </div>
     <div class="invitor_div">
         <label for="invitor">Invitor:</label>
         <span class="invitor" id="invitor">mucInvite.invitor</span>
     </div>
     <div class="reason_div">
         <label for="reason">Reason:</label>
         <span class="reason" id="reason">mucInvite.reason</span>
     </div>
     <div class="nick_div">
         <label for="nick">Nickname:</label>
         <input type="text" class="nick" id="nick">nickname</input>
     </div>
     <div class="action_div">
         <input class="action_button join" type="button" val="Join"/>
         <input class="action_button ignore" type="button" val="Ignore"/>
     </div>
</div>
*@param {Document} doc The document to use for creating content
Parameters:
doc
Returns:
{Element} The generated element to display

hide()

Hides the form in the document.


ignoreInvite()

Ignore the invite. Sends no response back to the server and triggers the actionComplete event with the ACTION_IGNORE constant.


joinRoom()

Join the room to which the invite has been received. Creates and joins the room specified by the MUCInvite object and, upon the enter room action completing, triggers the actionComplete event.


show()

Shows the form if hidden in the document.


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