Commit 2ed8b466 authored by JC Brand's avatar JC Brand

Bugfix. Duplicate rooms-list header

parent 99805d25
...@@ -259,10 +259,8 @@ converse.plugins.add('converse-bookmark-views', { ...@@ -259,10 +259,8 @@ converse.plugins.add('converse-bookmark-views', {
insertIntoControlBox () { insertIntoControlBox () {
const controlboxview = _converse.chatboxviews.get('controlbox'); const controlboxview = _converse.chatboxviews.get('controlbox');
if (controlboxview !== undefined && !u.rootContains(_converse.root, this.el)) { if (controlboxview !== undefined && !u.rootContains(_converse.root, this.el)) {
const el = controlboxview.el.querySelector('.bookmarks-list'); const el = controlboxview.el.querySelector('.list-container--bookmarks');
if (el !== null) { el && el.parentNode.replaceChild(this.el, el);
el.parentNode.replaceChild(this.el, el);
}
} }
}, },
......
...@@ -53,7 +53,7 @@ converse.plugins.add('converse-roomslist', { ...@@ -53,7 +53,7 @@ converse.plugins.add('converse-roomslist', {
_converse.RoomsListView = Backbone.VDOMView.extend({ _converse.RoomsListView = Backbone.VDOMView.extend({
tagName: 'div', tagName: 'div',
className: 'open-rooms-list list-container rooms-list-container', className: 'list-container list-container--openrooms',
events: { events: {
'click .add-bookmark': 'addBookmark', 'click .add-bookmark': 'addBookmark',
'click .close-room': 'closeRoom', 'click .close-room': 'closeRoom',
...@@ -111,10 +111,8 @@ converse.plugins.add('converse-roomslist', { ...@@ -111,10 +111,8 @@ converse.plugins.add('converse-roomslist', {
insertIntoControlBox () { insertIntoControlBox () {
const controlboxview = _converse.chatboxviews.get('controlbox'); const controlboxview = _converse.chatboxviews.get('controlbox');
if (controlboxview !== undefined && !u.rootContains(_converse.root, this.el)) { if (controlboxview !== undefined && !u.rootContains(_converse.root, this.el)) {
const el = controlboxview.el.querySelector('.open-rooms-list'); const el = controlboxview.el.querySelector('.list-container--openrooms');
if (el !== null) { el && el.parentNode.replaceChild(this.el, el);
el.parentNode.replaceChild(this.el, el);
}
} }
}, },
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
<a class="controlbox-heading__btn show-list-muc-modal fa fa-list-ul" title="{{{o.title_list_rooms}}}" data-toggle="modal" data-target="#list-chatrooms-modal"></a> <a class="controlbox-heading__btn show-list-muc-modal fa fa-list-ul" title="{{{o.title_list_rooms}}}" data-toggle="modal" data-target="#list-chatrooms-modal"></a>
<a class="controlbox-heading__btn show-add-muc-modal fa fa-plus" title="{{{o.title_new_room}}}" data-toggle="modal" data-target="#add-chatrooms-modal"></a> <a class="controlbox-heading__btn show-add-muc-modal fa fa-plus" title="{{{o.title_new_room}}}" data-toggle="modal" data-target="#add-chatrooms-modal"></a>
</div> </div>
<div class="list-container open-rooms-list rooms-list-container"></div> <div class="list-container list-container--openrooms"></div>
<div class="list-container bookmarks-list rooms-list-container"></div> <div class="list-container list-container--bookmarks"></div>
<!-- </div> --> <!-- </div> -->
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