Class jabberwerx.ui.MUCConfigView
Extends
jabberwerx.ui.JWView.
View for displaying XDataForm for room configuration.
This view displays the XDataForm received from the server.
Possible states for the view: not initialized/initialized error/non error stateConstructor Attributes | Constructor Name and Description |
---|---|
jabberwerx.ui.MUCConfigView(mucRoom)
Creates a MUCConfigView object. |
Field Attributes | Field Name and Description |
---|---|
The muc room passed in the constructor. |
- Fields borrowed from class jabberwerx.ui.JWView:
- jq
Method Attributes | Method Name and Description |
---|---|
cancel()
Destroys the view if not initialized, otherwise submits iq request for the form of type "cancel". |
|
createDOM(doc)
Creates the DOM for MUCConfigView. |
|
destroy()
Destroys this view. |
|
height(h, noupdate)
This implementation extends the superclass to adjust the content and tablist to match the new height. |
|
hide()
Hides the form in the document. |
|
show()
Shows the form if hidden in the document. |
|
submit()
Submits entered values the form in the document, displays errors if any occured or destroys the view. |
|
update()
Updates view based on server response. |
- Methods borrowed from class jabberwerx.ui.JWView:
- destroyDOM, dimensions, parent, persistOptions, remove, render, restoreDOM, restoreRender, restoreUpdate, shouldBeSavedWithGraph, 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 MUCConfigView object.
- Parameters:
- {jabberwerx.MUCRoom} mucRoom
- Muc room to configure.
- Throws:
- {TypeError}
- If {mucRoom} is not valid
The muc room passed in the constructor.
Destroys the view if not initialized, otherwise submits iq request for the form of type "cancel".
Creates the DOM for MUCConfigView. DOM:
<div class="jabberwerx muc_config_view" id="room1"> <div class="muc_config_form"> </div> <div class="muc_config_error"> </div> <div class="muc_config_buttons"> <input class="muc_config_button_submit join" type="button" val="Submit"/> <input class="muc_config_button_cancel join" type="button" val="Cancel"/> </div> </div> </div>
- Parameters:
- {Element} doc
- Element for embedding the view
- Returns:
- {Element} The generated element to display
Destroys this view. Unbinds invocations.
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)
Hides the form in the document.
Shows the form if hidden in the document.
Submits entered values the form in the document, displays errors if any occured or destroys the view.
Updates view based on server response. Adjusts heights for the view elements based on server response. If error is received, the height for the XDataForm element is reduced to accomodate error element. Also sets the dimenstions for XDataFormView .
- Returns:
- {Boolean} true if the view is updatable