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:
Constructor Attributes | Constructor Name and Description |
---|---|
jabberwerx.ui.MUCInviteView(muc, mucInvite, nickname)
Creates a MUCInviteView object. |
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. |
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 Attributes | Method Name and Description |
---|---|
createDOM(doc)
Creates the DOM to display. |
|
hide()
Hides the form in the document. |
|
Ignore the invite. |
|
joinRoom()
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
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
Returned as part of the event object in the actionComplete event when ignore is the action which has been taken.
Returned as part of the event object in the actionComplete event when join is the action which has been taken.
The muc controller object used to join the room.
The invite used to populate the information fields.
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
Hides the form in the document.
Ignore the invite. Sends no response back to the server and triggers the actionComplete event with the ACTION_IGNORE constant.
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.
Shows the form if hidden in the document.