Prechádzať zdrojové kódy

Update docs and rename option to use underscore instead of dash.

JC Brand 10 rokov pred
rodič
commit
ae90c7420e
3 zmenil súbory, kde vykonal 13 pridanie a 12 odobranie
  1. 3 3
      converse.js
  2. 1 0
      docs/CHANGES.rst
  3. 9 9
      docs/source/index.rst

+ 3 - 3
converse.js

@@ -219,7 +219,7 @@
             'emoticons': true,
             'emoticons': true,
             'call': false,
             'call': false,
             'clear': true,
             'clear': true,
-            'toggle-participants': true
+            'toggle_participants': true
         };
         };
         this.xhr_custom_status = false;
         this.xhr_custom_status = false;
         this.xhr_custom_status_url = '';
         this.xhr_custom_status_url = '';
@@ -269,7 +269,7 @@
             _.extend(
             _.extend(
                 this.visible_toolbar_buttons,
                 this.visible_toolbar_buttons,
                 _.pick(settings.visible_toolbar_buttons, [
                 _.pick(settings.visible_toolbar_buttons, [
-                    'emoticons', 'call', 'clear'
+                    'emoticons', 'call', 'clear', 'toggle_participants'
                 ]
                 ]
             ));
             ));
         }
         }
@@ -1482,7 +1482,7 @@
                                 show_call_button: converse.visible_toolbar_buttons.call,
                                 show_call_button: converse.visible_toolbar_buttons.call,
                                 show_clear_button: converse.visible_toolbar_buttons.clear,
                                 show_clear_button: converse.visible_toolbar_buttons.clear,
                                 show_emoticons: converse.visible_toolbar_buttons.emoticons,
                                 show_emoticons: converse.visible_toolbar_buttons.emoticons,
-                                show_participants_toggle: this.is_chatroom && converse.visible_toolbar_buttons['toggle-participants']
+                                show_participants_toggle: this.is_chatroom && converse.visible_toolbar_buttons.toggle_participants
                             })
                             })
                         )
                         )
                     );
                     );

+ 1 - 0
docs/CHANGES.rst

@@ -4,6 +4,7 @@ Changelog
 0.8.1 (Unreleased)
 0.8.1 (Unreleased)
 ------------------
 ------------------
 
 
+* Add a chat room toolbar button for toggling the list of participants. [jcbrand]
 * Converse.js now responds to XEP-0030: Service Discovery requests. [jcbrand]
 * Converse.js now responds to XEP-0030: Service Discovery requests. [jcbrand]
 * Bugfix. Roster groups all appear offline after page reload (with prebind).
 * Bugfix. Roster groups all appear offline after page reload (with prebind).
   See http://librelist.com/browser//conversejs/2014/8/26/problem-with-contact-list-everyone-is-offline/ [heban and jcbrand]
   See http://librelist.com/browser//conversejs/2014/8/26/problem-with-contact-list-everyone-is-offline/ [heban and jcbrand]

+ 9 - 9
docs/source/index.rst

@@ -1086,20 +1086,17 @@ Default:
 ::
 ::
 
 
     {
     {
-        'emoticons': true,
-        'call': false,
-        'clear': true
+        call: false,
+        clear: true,
+        emoticons: true,
+        toggle_participants: true
     }
     }
 
 
 Allows you to show or hide buttons on the chat boxes' toolbars.
 Allows you to show or hide buttons on the chat boxes' toolbars.
 
 
-* *emoticons*: 
-    Enables rendering of emoticons and provides a toolbar button for choosing them.
 * *call*: 
 * *call*: 
     Provides a button with a picture of a telephone on it.
     Provides a button with a picture of a telephone on it.
-    When the call button is pressed, it will emit an event that can be used by a third-party library to initiate a call.
-
-    ::
+    When the call button is pressed, it will emit an event that can be used by a third-party library to initiate a call.::
 
 
         converse.on('callButtonClicked', function(event, data) {
         converse.on('callButtonClicked', function(event, data) {
             console.log('Strophe connection is', data.connection);
             console.log('Strophe connection is', data.connection);
@@ -1108,7 +1105,10 @@ Allows you to show or hide buttons on the chat boxes' toolbars.
         });
         });
 * *clear*: 
 * *clear*: 
     Provides a button for clearing messages from a chat box.
     Provides a button for clearing messages from a chat box.
-
+* *emoticons*: 
+    Enables rendering of emoticons and provides a toolbar button for choosing them.
+* toggle_participants:
+    Shows a button for toggling (i.e. showing/hiding) the list of participants in a chat room.
 
 
 xhr_custom_status
 xhr_custom_status
 -----------------
 -----------------