Commit db550b3e authored by JC Brand's avatar JC Brand

Rename `controlboxInitialized` to `controlBoxInitialized`

to conform to conventions
parent ef5ecb2f
...@@ -152,7 +152,7 @@ converse.plugins.add('converse-controlbox', { ...@@ -152,7 +152,7 @@ converse.plugins.add('converse-controlbox', {
sticky_controlbox: false sticky_controlbox: false
}); });
_converse.api.promises.add('controlboxInitialized'); _converse.api.promises.add('controlBoxInitialized');
const addControlBox = () => _converse.chatboxes.add({'id': 'controlbox'}); const addControlBox = () => _converse.chatboxes.add({'id': 'controlbox'});
...@@ -171,7 +171,7 @@ converse.plugins.add('converse-controlbox', { ...@@ -171,7 +171,7 @@ converse.plugins.add('converse-controlbox', {
} }
}, },
onReconnection: function noop () {} onReconnection: function onReconnection () {}
}); });
...@@ -199,11 +199,11 @@ converse.plugins.add('converse-controlbox', { ...@@ -199,11 +199,11 @@ converse.plugins.add('converse-controlbox', {
* Triggered when the _converse.ControlBoxView has been initialized and therefore * Triggered when the _converse.ControlBoxView has been initialized and therefore
* exists. The controlbox contains the login and register forms when the user is * exists. The controlbox contains the login and register forms when the user is
* logged out and a list of the user's contacts and group chats when logged in. * logged out and a list of the user's contacts and group chats when logged in.
* @event _converse#controlboxInitialized * @event _converse#controlBoxInitialized
* @type { _converse.ControlBoxView } * @type { _converse.ControlBoxView }
* @example _converse.api.listen.on('controlboxInitialized', view => { ... }); * @example _converse.api.listen.on('controlBoxInitialized', view => { ... });
*/ */
_converse.api.trigger('controlboxInitialized', this); _converse.api.trigger('controlBoxInitialized', this);
_converse.api.trigger('chatBoxInitialized', this); _converse.api.trigger('chatBoxInitialized', this);
}, },
......
...@@ -1937,7 +1937,7 @@ converse.plugins.add('converse-muc-views', { ...@@ -1937,7 +1937,7 @@ converse.plugins.add('converse-muc-views', {
} }
}); });
_converse.api.listen.on('controlboxInitialized', (view) => { _converse.api.listen.on('controlBoxInitialized', (view) => {
if (!_converse.allow_muc) { if (!_converse.allow_muc) {
return; return;
} }
......
...@@ -139,7 +139,7 @@ converse.plugins.add('converse-register', { ...@@ -139,7 +139,7 @@ converse.plugins.add('converse-register', {
function setActiveForm (value) { function setActiveForm (value) {
_converse.api.waitUntil('controlboxInitialized').then(() => { _converse.api.waitUntil('controlBoxInitialized').then(() => {
const controlbox = _converse.chatboxes.get('controlbox') const controlbox = _converse.chatboxes.get('controlbox')
controlbox.set({'active-form': value}); controlbox.set({'active-form': value});
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL)); }).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
...@@ -684,7 +684,7 @@ converse.plugins.add('converse-register', { ...@@ -684,7 +684,7 @@ converse.plugins.add('converse-register', {
}); });
/************************ BEGIN Event Handlers ************************/ /************************ BEGIN Event Handlers ************************/
_converse.api.listen.on('controlboxInitialized', view => { _converse.api.listen.on('controlBoxInitialized', view => {
view.model.on('change:active-form', view.showLoginOrRegisterForm, view); view.model.on('change:active-form', view.showLoginOrRegisterForm, view);
}); });
/************************ END Event Handlers ************************/ /************************ END Event Handlers ************************/
......
...@@ -956,7 +956,7 @@ converse.plugins.add('converse-rosterview', { ...@@ -956,7 +956,7 @@ converse.plugins.add('converse-rosterview', {
}); });
_converse.api.listen.on('controlboxInitialized', (view) => { _converse.api.listen.on('controlBoxInitialized', (view) => {
function insertRoster () { function insertRoster () {
if (!view.model.get('connected') || _converse.authentication === _converse.ANONYMOUS) { if (!view.model.get('connected') || _converse.authentication === _converse.ANONYMOUS) {
return; return;
......
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