A | |
add, Candy. | |
addHandler, Candy.Core | |
addIgnoreIcon, Candy. | |
addTab, Candy. | |
addToOrRemoveFromPrivacyList, Candy. | |
adminMessage, Candy. | |
all, Candy. | |
allTabsClosed, Candy. | |
appendToMessagePane, Candy. | |
attach, Candy.Core | |
B | |
Bookmarks, Candy. | |
C | |
changeDataUserJidIfUserIsMe, Candy. | |
changeNick, Candy. | |
clearUnreadMessages | |
close, Candy. | |
connect, Candy.Core | |
Connect, Candy. | |
Connection, Candy. | |
cookieExists, Candy.Util | |
createHtml, Candy. | |
crop, Candy.Util | |
D | |
deleteCookie, Candy.Util | |
Disco | |
disconnect, Candy.Core | |
E | |
emotify, Candy. | |
escape, Candy. | |
escapeJid, Candy.Util | |
F | |
fitTabs, Candy. | |
forceRedraw, Candy.Util | |
G | |
get, Candy. | |
getAffiliation, Candy. | |
getAll, Candy. | |
getConnection, Candy.Core | |
getCookie, Candy.Util | |
getCurrent, Candy.View | |
getCustomData, Candy. | |
getEscapedJid, Candy. | |
getIeVersion, Candy.Util | |
GetIgnoreList, Candy. | |
getJid | |
GetJidIfAnonymous, Candy. | |
getMenuLinks, Candy. | |
getName, Candy. | |
getNick, Candy. | |
getOptions | |
getPane, Candy. | |
getPosLeftAccordingToWindowBounds, Candy.Util | |
getPosTopAccordingToWindowBounds, Candy.Util | |
getPrivacyList, Candy. | |
getRole, Candy. | |
getRoom, Candy.Core | |
getRooms, Candy.Core | |
getRoster, Candy. | |
getStropheStatus, Candy.Core | |
getTab, Candy. | |
getUser | |
H | |
hasFocus, Candy. | |
hasNicknameChanged, Candy. | |
hide | |
hideCloseControl, Candy. | |
hideSpinner, Candy. |
Add user to roster
this.add = function( user )
Wrapper for Strophe.Connection.addHandler() to add a stanza handler for the connection.
self.addHandler = function( handler, ns, name, type, id, from, options )
Add the ignore icon to the roster item of the specified user
addIgnoreIcon: function( roomJid, userJid )
Add a tab to the chat pane.
addTab: function( roomJid, roomName, roomType )
Convenience function for adding/removing users from ignore list.
this.addToOrRemoveFromPrivacyList = function( list, jid )
Display admin message
adminMessage: function( subject, message )
Does everything of the parser: escaping, linkifying and emotifying.
all: function( text )
All tabs closed event: Disconnect from service.
allTabsClosed: function()
Append a new message to the message pane.
appendToMessagePane: function( roomJid, html )
Attach an already binded & connected session to the server
self.attach = function( jid, sid, rid )
Acts on a bookmarks event.
Bookmarks: function( msg )
Changes the room’s data-userjid attribute if the specified user is the current user.
changeDataUserJidIfUserIsMe: function( roomId, user )
Changes the nick for every private room opened with this roomJid.
changeNick: function changeNick( roomJid, user )
Clear unread message count in a tab.
clearUnreadMessages: function( roomJid )
Clear unread message count in window title.
clearUnreadMessages: function()
Close a room and remove everything in the DOM belonging to this room.
close: function( roomJid )
Connect to the jabber host.
self.connect = function( jidOrHost, password, nick )
Acts on strophe status events and notifies view.
Connect: function( status )
The update method gets called whenever an event to which “Chat” is subscribed.
Connection: function( event, args )
Tests if a cookie with the given name exists
self.cookieExists = function( name )
Copy an HTML DOM element into an XML DOM.
self.createHtml = function( elem, maxLength, currentLength )
Crop a string with the specified length
self.crop = function( str, len )
Deletes a cookie with the given name
self.deleteCookie = function( name )
Requests disco info of a room.
Disco: function( roomJid )
Sets informations to rooms according to the disco info received.
Disco: function( msg )
Leave all rooms and disconnect
self.disconnect = function()
Replaces text-emoticons with their image equivalent.
emotify: function( text )
Escapes a text using a jQuery function (like htmlspecialchars in PHP)
escape: function( text )
Escapes a jid (node & resource get escaped)
self.escapeJid = function( jid )
Fit tab size according to window size
fitTabs: function()
Fix IE7 not redrawing under some circumstances.
self.forceRedraw = function( elem )
Get user from roster
this.get = function( jid )
Gets user affiliation
this.getAffiliation = function()
Get all items
this.getAll = function()
Gets Strophe connection
self.getConnection = function()
Returns the cookie value if there’s one with this name, otherwise returns undefined
self.getCookie = function( name )
Get current container & roomJid in an object.
self.getCurrent = function()
Retrieve custom data
this.getCustomData = function()
Escapes the user’s jid (node & resource get escaped)
this.getEscapedJid = function()
Returns local variable `ie` which you can use to detect which IE version is available.
self.getIeVersion = function()
Get existing ignore privacy list when connecting.
GetIgnoreList: function()
Get room jid
this.getJid = function()
Gets an unescaped user jid
this.getJid = function()
On anonymous login, initially we don’t know the jid and as a result, Candy.Core._user doesn’t have a jid.
GetJidIfAnonymous: function()
Extends initialMenuLinks with menu links gathered from candy:view.roster.contextmenu
getMenuLinks: function( roomJid, user, elem )
Get room name
this.getName = function()
Gets user nick
this.getNick = function()
Gets options
self.getOptions = function()
Gets options
self.getOptions = function()
Get the chat room pane or a subPane of it (if subPane is specified)
getPane: function( roomJid, subPane )
Fetches the window width and element width and checks if specified position + element width is bigger than the window width.
self.getPosLeftAccordingToWindowBounds = function( elem, pos )
Fetches the window height and element height and checks if specified position + element height is bigger than the window height.
self.getPosTopAccordingToWindowBounds = function( elem, pos )
Returns the privacy list of the listname of the param.
this.getPrivacyList = function( list )
Gets user role
this.getRole = function()
Gets a specific room
self.getRoom = function( roomJid )
Gets all joined rooms
self.getRooms = function()
Get roster
this.getRoster = function()
Get the status set by Strophe.
self.getStropheStatus = function()
Get tab by JID.
getTab: function( roomJid )
Gets current user
self.getUser = function()
Get current local user
this.getUser = function()
Get the current user in the room specified with the jid
getUser: function( roomJid )
Checks if window has focus
hasFocus: function()
Hide modal window
hide: function( callback )
Hide toolbar.
hide: function()
Hide the close button
hideCloseControl: function()
Hide loading spinner
hideSpinner: function()