Bläddra i källkod

Rename `controlboxInitialized` to `controlBoxInitialized`

to conform to conventions
JC Brand 6 år sedan
förälder
incheckning
db550b3ec7
4 ändrade filer med 9 tillägg och 9 borttagningar
  1. 5 5
      src/converse-controlbox.js
  2. 1 1
      src/converse-muc-views.js
  3. 2 2
      src/converse-register.js
  4. 1 1
      src/converse-rosterview.js

+ 5 - 5
src/converse-controlbox.js

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

+ 1 - 1
src/converse-muc-views.js

@@ -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;
             }

+ 2 - 2
src/converse-register.js

@@ -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 ************************/

+ 1 - 1
src/converse-rosterview.js

@@ -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;