Commit 501c9f5e authored by JC Brand's avatar JC Brand

muc: Extract code into separate method `renderRoomsPanel`

parent 7c9475e9
......@@ -143,10 +143,9 @@
},
ControlBoxView: {
renderContactsPanel: function () {
renderRoomsPanel: function () {
var _converse = this.__super__._converse;
this.__super__.renderContactsPanel.apply(this, arguments);
if (_converse.allow_muc) {
this.roomspanel = new _converse.RoomsPanel({
'$parent': this.$el.find('.controlbox-panes'),
'model': new (Backbone.Model.extend({
......@@ -162,6 +161,13 @@
});
}
_converse.emit('roomsPanelRendered');
},
renderContactsPanel: function () {
var _converse = this.__super__._converse;
this.__super__.renderContactsPanel.apply(this, arguments);
if (_converse.allow_muc) {
this.renderRoomsPanel();
}
},
......
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