Namespace: window

jsxc.gui. window

Handle functions related to the gui of the window
Source:

Methods

<static> _close(bid)

Close chatwindow
Parameters:
Name Type Description
bid String
Source:

<static> _hide(bid)

Minimize text area
Parameters:
Name Type Description
bid String
Source:

<static> _postMessage(bid, post, restore)

Write Message to chat area
Parameters:
Name Type Description
bid String bar jid
post Object Post object with direction, msg, uid, received
restore Bool If true no highlights are used
Source:

<static> _show(bid) → {undefined}

Maximize text area
Parameters:
Name Type Description
bid String
Source:
Returns:
Type
undefined

<static> clear(bid) → {undefined}

Clear chat history
Parameters:
Name Type Description
bid type
Source:
Returns:
Type
undefined

<static> close(bid)

Close chatwindow and clean up
Parameters:
Name Type Description
bid String bar jid
Source:

<static> get(bid) → {jquery}

Returns the window element
Parameters:
Name Type Description
bid String
Source:
Returns:
jQuery object of the window element
Type
jquery

<static> hide(bid)

Minimize text area and save
Parameters:
Name Type Argument Description
bid String <optional>
Source:

<static> highlight(bid)

Highlight window
Parameters:
Name Type Description
bid type
Source:

<static> init(bid) → {jQuery}

Init a window skeleton
Parameters:
Name Type Description
bid String
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
bid String
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
message jsxc.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
args object New message properties
Properties
Name Type Description
bid string
direction direction
msg string
encrypted boolean
forwarded boolean
sender boolean
stamp integer
attachment object Attached data
Properties
Name Type Description
name string File name
size string File size
type string File type
data string File data
Source:
Returns:
maybe modified message object
Type
jsxc.Message

<static> receivedMessage(bid, uid)

Mark message as received.
Parameters:
Name Type Description
bid string
uid string 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
    win string | jquery Bid or window object
    ui object The size has to be in the format {size:{width: [INT], height: [INT]}}
    outer boolean <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
    bid type
    Source:
    Returns:
    Type
    undefined

    <static> scrollDown(bid)

    Scroll chat area to the bottom
    Parameters:
    Name Type Description
    bid String bar jid
    Source:

    <static> setText(bid, text) → {undefined}

    Set text into input area
    Parameters:
    Name Type Description
    bid type
    text type
    Source:
    Returns:
    Type
    undefined

    <static> show(bid)

    Maximize text area and save
    Parameters:
    Name Type Description
    bid String
    Source:

    <static> toggle(bid)

    Toggle between minimize and maximize of the text area
    Parameters:
    Name Type Description
    bid String bar jid
    Source: