J | |
jidToId, Candy.Util | |
Join, Candy. | |
joinAnimation, Candy. | |
L | |
Leave | |
leaveAnimation, Candy. | |
linkify, Candy. | |
localizedTime, Candy.Util | |
log, Candy.Core | |
Login | |
M | |
Message | |
N | |
nl2br, Candy. | |
notifyPrivateChats, Candy. | |
O | |
observer.js | |
onAutoscrollControlClick, Candy. | |
onBlur, Candy. | |
onFocus, Candy. | |
onInfoMessage, Candy. | |
onPlaySound, Candy. | |
onScrollToBottom, Candy. | |
onScrollToStoredPosition, Candy. | |
onSoundControlClick, Candy. | |
onStatusMessageControlClick, Candy. | |
onWindowUnload, Candy.Core | |
open, Candy. | |
P | |
pane.js | |
parseAndCropXhtml, Candy.Util | |
playSound, Candy. | |
Presence | |
PresenceError | |
presencePriority, Candy.Core | |
PrivacyList, Candy. | |
PrivacyListError, Candy. | |
Private Functions | |
R | |
rawInput, Candy.Core | |
reduceUnreadMessages, Candy. | |
registerEventHandlers, Candy.Core | |
remove, Candy. | |
removeIgnoreIcon, Candy. | |
RemoveIgnoreList, Candy. | |
removeRoom, Candy.Core | |
removeTab, Candy. | |
renderUnreadMessages, Candy. | |
ResetIgnoreList, Candy. | |
resource, Candy.Core | |
ROLE_MODERATOR, Candy. | |
room, Candy. | |
rooms, Candy. | |
Roster |
Translates a jid to a MD5-Id
self.jidToId = function( jid )
Requests disco of specified room and joins afterwards.
Join: function( roomJid, password )
Animates specified elementId on join
joinAnimation: function( elementId )
Leaves a room.
Leave: function( roomJid )
Leaves a room and cleans up related data and notifies view.
Leave: function( msg )
Leave animation for specified element id and removes the DOM element on completion.
leaveAnimation: function( elementId )
Replaces URLs with a HTML-link.
linkify: function( text )
Localizes ISO-8610 Date with the time/dateformat specified in the translation.
self.localizedTime = function( dateTime )
Overridden to do something useful if debug is set to true.
self.log = function()
Notify view that the login window should be displayed
self.Login = function( presetJid )
Send message
Message: function( roomJid, msg, type, xhtmlMsg )
Acts on room, admin and server messages and notifies the view if required.
Message: function( msg )
Acts on various message events (subject changed, private chat message, multi-user chat message) and notifies view.
Message: function( msg )
Dispatches admin and info messages
Message: function( event, args )
replaces newline characters with a br/ to make multi line messages look nice
nl2br: function( text )
Notify private user chats if existing
notifyPrivateChats: function( user, type )
Autoscroll control event handler.
onAutoscrollControlClick: function()
Window blur event handler.
onBlur: function()
Window focus event handler.
onFocus: function()
Display info message.
onInfoMessage: function( roomJid, subject, message )
Sound play event handler.
onPlaySound: function()
Scrolls to the latest message received/sent.
onScrollToBottom: function( roomJid )
When autoscroll is off, the position where the scrollbar is has to be stored for each room, because it otherwise goes to the top in the message window.
onScrollToStoredPosition: function( roomJid )
Sound control click event handler.
onSoundControlClick: function()
Status message control event handler.
onStatusMessageControlClick: function()
window.onbeforeunload event which disconnects the client from the Jabber server.
self.onWindowUnload = function()
Opens a new private room
open: function( roomJid, roomName, switchToRoom, isNoConferenceRoomJid )
Parses the XHTML and applies various Candy related filters to it.
self.parseAndCropXhtml = function( str, len )
Play sound (default method).
playSound: function()
Sends a request for presence
Presence: function( attr, el )
Acts on a presence event
Presence: function( msg )
Acts on various presence messages (room leaving, room joining, error presence) and notifies view.
Presence: function( msg )
Acts when a presence of type error has been retrieved.
PresenceError: function( msg )
Default priority for presence messages in order to receive messages across different resources
presencePriority: 1
Acts on a privacy list event and sets up the current privacy list of this user.
PrivacyList: function( msg )
Acts when a privacy list error has been received.
PrivacyListError: function( msg )
(Overridden from Strophe.Connection.rawInput)
self.rawInput = function( data )
Reduce unread message count in window title by `num`.
reduceUnreadMessages: function( num )
Adds listening handlers to the connection.
self.registerEventHandlers = function()
Remove user from roster
this.remove = function( jid )
Remove the ignore icon to the roster item of the specified user
removeIgnoreIcon: function( roomJid, userJid )
Remove an existing ignore list.
RemoveIgnoreList: function()
Removes a room from the rooms list
self.removeRoom = function( roomJid )
Remove tab element.
removeTab: function( roomJid )
Update window title to show message count.
renderUnreadMessages: function( count )
Create new ignore privacy list (and reset the previous one, if it exists).
ResetIgnoreList: function()
JID resource to use when connecting to the server.
resource: Candy.about.name
Object containing roomJid and name.
this.room
Contains opened room elements
rooms: []
Sends a request for a roster
Roster: function()