Bookmark icon shown in open rooms list when allow_bookmarks set to false

This commit is contained in:
JC Brand 2017-07-19 09:28:44 +02:00
parent 0edb38e2c6
commit 6ac01ed2ac
3 changed files with 6 additions and 0 deletions

View File

@ -26,6 +26,8 @@
- Room name wasn't being updated after changing it in the configuration form. [jcbrand]
- Server disco features were "forgotten" after logging out and then logging in again. [jcbrand]
- Don't show duplicate sent groupchat messages in Slack chat rooms. [jcbrand]
- Bookmark icon shown in the open rooms list when `allow_bookmarks` is to `false`. [jcbrand]
- #879 Text in links are converted to smileys leading to non-clickable links.
## 3.1.1 (2017-07-12)

View File

@ -117,6 +117,7 @@
}
const div = document.createElement('div');
div.innerHTML = tpl_rooms_list_item(_.extend(item.toJSON(), {
'allow_bookmarks': _converse.allow_bookmarks,
'info_leave_room': __('Leave this room'),
'info_remove_bookmark': __('Unbookmark this room'),
'info_title': __('Show more information on this room'),

View File

@ -9,9 +9,12 @@
data-room-jid="{{{jid}}}"
data-room-name="{{{name}}}"
title="{{{info_leave_room}}}" href="#">&nbsp;</a>
{[ if (allow_bookmarks) { ]}
<a class="right remove-bookmark icon-pushpin {[ if (bookmarked) { ]} button-on {[ } ]}"
data-room-jid="{{{jid}}}" data-bookmark-name="{{{name}}}"
title="{{{info_remove_bookmark}}}" href="#">&nbsp;</a>
{[ } ]}
<a class="right room-info icon-room-info" data-room-jid="{{{jid}}}"
title="{{{info_title}}}" href="#">&nbsp;</a>
</dd>