Rename controlboxInitialized to controlBoxInitialized

to conform to conventions
This commit is contained in:
JC Brand 2019-08-05 11:10:32 +02:00
parent ef5ecb2f3a
commit db550b3ec7
4 changed files with 9 additions and 9 deletions

View File

@ -152,7 +152,7 @@ converse.plugins.add('converse-controlbox', {
sticky_controlbox: false
});
_converse.api.promises.add('controlboxInitialized');
_converse.api.promises.add('controlBoxInitialized');
const addControlBox = () => _converse.chatboxes.add({'id': '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', {
* Triggered when the _converse.ControlBoxView has been initialized and therefore
* 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.
* @event _converse#controlboxInitialized
* @event _converse#controlBoxInitialized
* @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);
},

View File

@ -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) {
return;
}

View File

@ -139,7 +139,7 @@ converse.plugins.add('converse-register', {
function setActiveForm (value) {
_converse.api.waitUntil('controlboxInitialized').then(() => {
_converse.api.waitUntil('controlBoxInitialized').then(() => {
const controlbox = _converse.chatboxes.get('controlbox')
controlbox.set({'active-form': value});
}).catch(_.partial(_converse.log, _, Strophe.LogLevel.FATAL));
@ -684,7 +684,7 @@ converse.plugins.add('converse-register', {
});
/************************ BEGIN Event Handlers ************************/
_converse.api.listen.on('controlboxInitialized', view => {
_converse.api.listen.on('controlBoxInitialized', view => {
view.model.on('change:active-form', view.showLoginOrRegisterForm, view);
});
/************************ END Event Handlers ************************/

View File

@ -956,7 +956,7 @@ converse.plugins.add('converse-rosterview', {
});
_converse.api.listen.on('controlboxInitialized', (view) => {
_converse.api.listen.on('controlBoxInitialized', (view) => {
function insertRoster () {
if (!view.model.get('connected') || _converse.authentication === _converse.ANONYMOUS) {
return;