Commit 4186bf3c authored by JC Brand's avatar JC Brand

Throw event onRosterViewUpdated whenever the roster HTML changes. Fixes #101

parent 8633d237
......@@ -3041,6 +3041,7 @@
if (!$count.is(':visible')) {
$count.show();
}
converse.emit('onRosterViewUpdated');
return this;
},
......
......@@ -624,6 +624,12 @@ Here are the different events that are emitted:
Triggered when the roster is updated.
* **onRosterViewUpdated**
``converse.on('onRosterViewUpdated', function (items) { ... });``
Triggered whenever the roster view (i.e. the rendered HTML) has changed.
* **onChatBoxFocused**
``converse.on('onChatBoxFocused', function (chatbox) { ... });``
......
This diff is collapsed.
......@@ -8,6 +8,8 @@
);
} (this, function (mock, utils) {
return describe("Converse", $.proxy(function(mock, utils) {
window.localStorage.clear();
it("allows you to subscribe to emitted events", function () {
this.callback = function () {};
spyOn(this, 'callback');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment