فهرست منبع

Emit new event onChatBoxToggled

JC Brand 11 سال پیش
والد
کامیت
ec39e6e802
2فایلهای تغییر یافته به همراه10 افزوده شده و 3 حذف شده
  1. 1 0
      converse.js
  2. 9 3
      docs/source/index.rst

+ 1 - 0
converse.js

@@ -1318,6 +1318,7 @@
                 // Toggle drag resize ability
                 this.$el.find('.dragresize-tm').toggle();
                 this.setChatBoxHeight(this.height);
+                converse.emit('onChatBoxToggled', this);
             },
 
             updateVCard: function () {

+ 9 - 3
docs/source/index.rst

@@ -805,6 +805,12 @@ Here are the different events that are emitted:
 
     Triggered whenever the roster view (i.e. the rendered HTML) has changed.
 
+* **onChatBoxClosed**
+
+    ``converse.on('onChatBoxClosed', function (chatbox) { ... });``
+
+    Triggered when a chat box has been closed.
+
 * **onChatBoxFocused**
 
     ``converse.on('onChatBoxFocused', function (chatbox) { ... });``
@@ -817,11 +823,11 @@ Here are the different events that are emitted:
 
     Triggered when a chat box has been opened.
 
-* **onChatBoxClosed**
+* **onChatBoxToggled**
 
-    ``converse.on('onChatBoxClosed', function (chatbox) { ... });``
+    ``converse.on('onChatBoxToggled', function (chatbox) { ... });``
 
-    Triggered when a chat box has been closed.
+    Triggered when a chat box has been minimized or maximized.
 
 * **onStatusChanged**