Emit new event onChatBoxToggled

This commit is contained in:
JC Brand 2014-03-04 20:16:03 +02:00
parent b14538b441
commit ec39e6e802
2 changed files with 10 additions and 3 deletions

View File

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

View File

@ -805,6 +805,12 @@ Here are the different events that are emitted:
Triggered whenever the roster view (i.e. the rendered HTML) has changed. 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** * **onChatBoxFocused**
``converse.on('onChatBoxFocused', function (chatbox) { ... });`` ``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. 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** * **onStatusChanged**