ソースを参照

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

JC Brand 8 年 前
コミット
6ac01ed2ac
3 ファイル変更6 行追加0 行削除
  1. 2 0
      CHANGES.md
  2. 1 0
      src/converse-roomslist.js
  3. 3 0
      src/templates/rooms_list_item.html

+ 2 - 0
CHANGES.md

@@ -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)
 

+ 1 - 0
src/converse-roomslist.js

@@ -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'),

+ 3 - 0
src/templates/rooms_list_item.html

@@ -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>