Handle functions related to the gui of the window
- Source:
Methods
-
<static> _close(bid)
-
Close chatwindow
Parameters:
Name Type Description bidString - Source:
-
<static> _hide(bid)
-
Minimize text area
Parameters:
Name Type Description bidString - Source:
-
<static> _postMessage(bid, post, restore)
-
Write Message to chat area
Parameters:
Name Type Description bidString bar jid postObject Post object with direction, msg, uid, received restoreBool If true no highlights are used - Source:
-
<static> _show(bid) → {undefined}
-
Maximize text area
Parameters:
Name Type Description bidString - Source:
Returns:
- Type
- undefined
-
<static> clear(bid) → {undefined}
-
Clear chat history
Parameters:
Name Type Description bidtype - Source:
Returns:
- Type
- undefined
-
<static> close(bid)
-
Close chatwindow and clean up
Parameters:
Name Type Description bidString bar jid - Source:
-
<static> get(bid) → {jquery}
-
Returns the window element
Parameters:
Name Type Description bidString - Source:
Returns:
jQuery object of the window element- Type
- jquery
-
<static> hide(bid)
-
Minimize text area and save
Parameters:
Name Type Argument Description bidString <optional>
- Source:
-
<static> highlight(bid)
-
Highlight window
Parameters:
Name Type Description bidtype - Source:
-
<static> init(bid) → {jQuery}
-
Init a window skeleton
Parameters:
Name Type Description bidString - Source:
Returns:
Window object- Type
- jQuery
-
<static> open(bid) → {jQuery}
-
Open a window, related to the bid. If the window doesn't exist, it will be created.
Parameters:
Name Type Description bidString - Source:
Returns:
Window object- Type
- jQuery
-
<static> postMessage(message) → {jsxc.Message}
-
Write Message to chat area and save. Check border cases and remove html.
Parameters:
Name Type Description messagejsxc.Message object to be send - Source:
Returns:
maybe modified message object- Type
- jsxc.Message
-
<static> postMessage(args) → {jsxc.Message}
-
Create message object from given properties, write Message to chat area and save. Check border cases and remove html.
Parameters:
Name Type Description argsobject New message properties Properties
Name Type Description bidstring directiondirection msgstring encryptedboolean forwardedboolean senderboolean stampinteger attachmentobject Attached data Properties
Name Type Description namestring File name sizestring File size typestring File type datastring File data - Source:
Returns:
maybe modified message object- Type
- jsxc.Message
-
<static> receivedMessage(bid, uid)
-
Mark message as received.
Parameters:
Name Type Description bidstring uidstring message id - Deprecated:
- since v3.0.0. Use jsxc.Message.received.
- Source:
-
<static> resize(win, ui, outer)
-
Resize given window to given size. If no size is provided the window is resized to the default size.
Parameters:
Name Type Argument Description winstring | jquery Bid or window object uiobject The size has to be in the format {size:{width: [INT], height: [INT]}} outerboolean <optional>
If true the given size is used as outer dimensions. - Source:
-
<static> restoreChat(bid) → {undefined}
-
Load old log into chat area
Parameters:
Name Type Description bidtype - Source:
Returns:
- Type
- undefined
-
<static> scrollDown(bid)
-
Scroll chat area to the bottom
Parameters:
Name Type Description bidString bar jid - Source:
-
<static> setText(bid, text) → {undefined}
-
Set text into input area
Parameters:
Name Type Description bidtype texttype - Source:
Returns:
- Type
- undefined
-
<static> show(bid)
-
Maximize text area and save
Parameters:
Name Type Description bidString - Source:
-
<static> toggle(bid)
-
Toggle between minimize and maximize of the text area
Parameters:
Name Type Description bidString bar jid - Source: