Commit 0992c8d9 authored by JC Brand's avatar JC Brand

Update events documentation

Looks like now that we use Backbone.Events we don't get event objects passed
to the handlers.
parent f9898f32
...@@ -32,7 +32,7 @@ cachedRoster ...@@ -32,7 +32,7 @@ cachedRoster
The contacts roster has been retrieved from the local cache (`sessionStorage`). The contacts roster has been retrieved from the local cache (`sessionStorage`).
``_converse.on('cachedRoster', function (event, items) { ... });`` ``_converse.on('cachedRoster', function (items) { ... });``
See also the `roster`_ event further down. See also the `roster`_ event further down.
...@@ -41,70 +41,70 @@ callButtonClicked ...@@ -41,70 +41,70 @@ callButtonClicked
When a call button (i.e. with class .toggle-call) on a chat box has been clicked. When a call button (i.e. with class .toggle-call) on a chat box has been clicked.
``_converse.on('callButtonClicked', function (event, connection, model) { ... });`` ``_converse.on('callButtonClicked', function (connection, model) { ... });``
chatBoxInitialized chatBoxInitialized
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
When a chat box has been initialized. Relevant to converse-chatview.js plugin. When a chat box has been initialized. Relevant to converse-chatview.js plugin.
``_converse.on('chatBoxInitialized', function (event, chatbox) { ... });`` ``_converse.on('chatBoxInitialized', function (chatbox) { ... });``
chatBoxOpened chatBoxOpened
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
When a chat box has been opened. Relevant to converse-chatview.js plugin. When a chat box has been opened. Relevant to converse-chatview.js plugin.
``_converse.on('chatBoxOpened', function (event, chatbox) { ... });`` ``_converse.on('chatBoxOpened', function (chatbox) { ... });``
chatRoomOpened chatRoomOpened
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
When a chat room has been opened. Relevant to converse-chatview.js plugin. When a chat room has been opened. Relevant to converse-chatview.js plugin.
``_converse.on('chatRoomOpened', function (event, chatbox) { ... });`` ``_converse.on('chatRoomOpened', function (chatbox) { ... });``
chatBoxClosed chatBoxClosed
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
When a chat box has been closed. Relevant to converse-chatview.js plugin. When a chat box has been closed. Relevant to converse-chatview.js plugin.
``_converse.on('chatBoxClosed', function (event, chatbox) { ... });`` ``_converse.on('chatBoxClosed', function (chatbox) { ... });``
chatBoxFocused chatBoxFocused
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
When the focus has been moved to a chat box. Relevant to converse-chatview.js plugin. When the focus has been moved to a chat box. Relevant to converse-chatview.js plugin.
``_converse.on('chatBoxFocused', function (event, chatbox) { ... });`` ``_converse.on('chatBoxFocused', function (chatbox) { ... });``
chatBoxToggled chatBoxToggled
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
When a chat box has been minimized or maximized. Relevant to converse-chatview.js plugin. When a chat box has been minimized or maximized. Relevant to converse-chatview.js plugin.
``_converse.on('chatBoxToggled', function (event, chatbox) { ... });`` ``_converse.on('chatBoxToggled', function (chatbox) { ... });``
connected connected
~~~~~~~~~ ~~~~~~~~~
After connection has been established and converse.js has got all its ducks in a row. After connection has been established and converse.js has got all its ducks in a row.
``_converse.on('connected', function (event) { ... });`` ``_converse.on('connected', function () { ... });``
contactRequest contactRequest
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Someone has requested to subscribe to your presence (i.e. to be your contact). Someone has requested to subscribe to your presence (i.e. to be your contact).
``_converse.on('contactRequest', function (event, user_data) { ... });`` ``_converse.on('contactRequest', function (user_data) { ... });``
contactRemoved contactRemoved
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
The user has removed a contact. The user has removed a contact.
``_converse.on('contactRemoved', function (event, data) { ... });`` ``_converse.on('contactRemoved', function (data) { ... });``
contactStatusChanged contactStatusChanged
...@@ -112,28 +112,28 @@ contactStatusChanged ...@@ -112,28 +112,28 @@ contactStatusChanged
When a chat buddy's chat status has changed. When a chat buddy's chat status has changed.
``_converse.on('contactStatusChanged', function (event, buddy) { ... });`` ``_converse.on('contactStatusChanged', function (buddy) { ... });``
contactStatusMessageChanged contactStatusMessageChanged
~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
When a chat buddy's custom status message has changed. When a chat buddy's custom status message has changed.
``_converse.on('contactStatusMessageChanged', function (event, data) { ... });`` ``_converse.on('contactStatusMessageChanged', function (data) { ... });``
disconnected disconnected
~~~~~~~~~~~~ ~~~~~~~~~~~~
After converse.js has disconnected from the XMPP server. After converse.js has disconnected from the XMPP server.
``_converse.on('disconnected', function (event) { ... });`` ``_converse.on('disconnected', function () { ... });``
initialized initialized
~~~~~~~~~~~ ~~~~~~~~~~~
Once converse.js has been initialized. Once converse.js has been initialized.
``_converse.on('initialized', function (event) { ... });`` ``_converse.on('initialized', function () { ... });``
See also `pluginsInitialized`_. See also `pluginsInitialized`_.
...@@ -142,21 +142,21 @@ logout ...@@ -142,21 +142,21 @@ logout
The user has logged out. The user has logged out.
``_converse.on('logout', function (event) { ... });`` ``_converse.on('logout', function () { ... });``
messageSend messageSend
~~~~~~~~~~~ ~~~~~~~~~~~
When a message will be sent out. When a message will be sent out.
``_converse.on('messageSend', function (event, messageText) { ... });`` ``_converse.on('messageSend', function (messageText) { ... });``
noResumeableSession noResumeableSession
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
When keepalive=true but there aren't any stored prebind tokens. When keepalive=true but there aren't any stored prebind tokens.
``_converse.on('noResumeableSession', function (event) { ... });`` ``_converse.on('noResumeableSession', function () { ... });``
pluginsInitialized pluginsInitialized
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
...@@ -167,7 +167,7 @@ plugins. In that case, you need to first wait until all plugins have been ...@@ -167,7 +167,7 @@ plugins. In that case, you need to first wait until all plugins have been
initialized, so that their overrides are active. One example where this is used initialized, so that their overrides are active. One example where this is used
is in `converse-notifications.js <https://github.com/jcbrand/converse.js/blob/master/src/converse-notification.js>`. is in `converse-notifications.js <https://github.com/jcbrand/converse.js/blob/master/src/converse-notification.js>`.
``_converse.on('pluginsInitialized', function (event) { ... });`` ``_converse.on('pluginsInitialized', function () { ... });``
reconnecting reconnecting
~~~~~~~~~~~~ ~~~~~~~~~~~~
...@@ -182,28 +182,28 @@ After the connection has dropped and converse.js has reconnected. ...@@ -182,28 +182,28 @@ After the connection has dropped and converse.js has reconnected.
Any Strophe stanza handlers (as registered via `converse.listen.stanza`) will Any Strophe stanza handlers (as registered via `converse.listen.stanza`) will
have to be registered anew. have to be registered anew.
``_converse.on('reconnected', function (event) { ... });`` ``_converse.on('reconnected', function () { ... });``
roomInviteSent roomInviteSent
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
After the user has sent out a direct invitation, to a roster contact, asking them to join a room. After the user has sent out a direct invitation, to a roster contact, asking them to join a room.
``_converse.on('roomInvite', function (event, data) { ... });`` ``_converse.on('roomInvite', function (data) { ... });``
roomInviteReceived roomInviteReceived
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
After the user has sent out a direct invitation, to a roster contact, asking them to join a room. After the user has sent out a direct invitation, to a roster contact, asking them to join a room.
``_converse.on('roomInvite', function (event, data) { ... });`` ``_converse.on('roomInvite', function (data) { ... });``
roster roster
~~~~~~ ~~~~~~
When the roster has been received from the XMPP server. When the roster has been received from the XMPP server.
``_converse.on('roster', function (event, items) { ... });`` ``_converse.on('roster', function (items) { ... });``
See also the `cachedRoster` event further up, which gets called instead of See also the `cachedRoster` event further up, which gets called instead of
`roster` if its already in `sessionStorage`. `roster` if its already in `sessionStorage`.
...@@ -234,7 +234,7 @@ rosterPush ...@@ -234,7 +234,7 @@ rosterPush
When the roster receives a push event from server. (i.e. New entry in your buddy list) When the roster receives a push event from server. (i.e. New entry in your buddy list)
``_converse.on('rosterPush', function (event, items) { ... });`` ``_converse.on('rosterPush', function (items) { ... });``
rosterReadyAfterReconnection rosterReadyAfterReconnection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -248,25 +248,25 @@ statusInitialized ...@@ -248,25 +248,25 @@ statusInitialized
When own chat status has been initialized. When own chat status has been initialized.
``_converse.on('statusInitialized', function (event, status) { ... });`` ``_converse.on('statusInitialized', function (status) { ... });``
statusChanged statusChanged
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
When own chat status has changed. When own chat status has changed.
``_converse.on('statusChanged', function (event, status) { ... });`` ``_converse.on('statusChanged', function (status) { ... });``
statusMessageChanged statusMessageChanged
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
When own custom status message has changed. When own custom status message has changed.
``_converse.on('statusMessageChanged', function (event, message) { ... });`` ``_converse.on('statusMessageChanged', function (message) { ... });``
serviceDiscovered serviceDiscovered
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
When converse.js has learned of a service provided by the XMPP server. See XEP-0030. When converse.js has learned of a service provided by the XMPP server. See XEP-0030.
``_converse.on('serviceDiscovered', function (event, service) { ... });`` ``_converse.on('serviceDiscovered', function (service) { ... });``
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment