Two changes, see below:

* Call refreshWebkit hack when opening a chat room
* New event emitted when a chat room is opened.
This commit is contained in:
JC Brand 2014-07-17 19:18:13 +02:00
parent ac6a3cb26c
commit 53f38dcc71
2 changed files with 6 additions and 0 deletions

View File

@ -1934,6 +1934,10 @@
render: function () {
this.$el.attr('id', this.model.get('box_id'))
.html(converse.templates.chatroom(this.model.toJSON()));
converse.emit('chatRoomOpened', this);
setTimeout(function () {
converse.refreshWebkit();
}, 50);
return this;
},

View File

@ -783,6 +783,8 @@ Here are the different events that are emitted:
+----------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
| **chatBoxOpened** | When a chat box has been opened. | ``converse.on('chatBoxOpened', function (chatbox) { ... });`` |
+----------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
| **chatRoomOpened** | When a chat room has been opened. | ``converse.on('chatRoomOpened', function (chatbox) { ... });`` |
+----------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
| **chatBoxClosed** | When a chat box has been closed. | ``converse.on('chatBoxClosed', function (chatbox) { ... });`` |
+----------------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------+
| **chatBoxFocused** | When the focus has been moved to a chat box. | ``converse.on('chatBoxFocused', function (chatbox) { ... });`` |