Browse Source

Show the MUC server in a bookmarked room's info view

JC Brand 8 năm trước cách đây
mục cha
commit
bc1fa24315
3 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 1 0
      docs/CHANGES.md
  2. 2 0
      src/converse-muc.js
  3. 1 0
      src/templates/room_description.html

+ 1 - 0
docs/CHANGES.md

@@ -9,6 +9,7 @@
 - sinon 2.1.0
 - eslint 3.19.0
 
+- Show the MUC server in a bookmarked room's info view (in the bookmarks list). [jcbrand]
 - Enable creation of `dist/converse-muc-embedded.js` build file for the
   embedded MUC room demo. [jcbrand]
 - Use `noConflict` to avoid polluting globale namespace with lodash and Backbone. [jcbrand]

+ 2 - 0
src/converse-muc.js

@@ -2427,6 +2427,7 @@
                     // All MUC features found here: http://xmpp.org/registrar/disco-features.html
                     $(el).find('span.spinner').replaceWith(
                         tpl_room_description({
+                            'server': Strophe.getDomainFromJid(stanza.getAttribute('from')),
                             'desc': $stanza.find('field[var="muc#roominfo_description"] value').text(),
                             'occ': $stanza.find('field[var="muc#roominfo_occupants"] value').text(),
                             'hidden': $stanza.find('feature[var="muc_hidden"]').length,
@@ -2441,6 +2442,7 @@
                             'temporary': $stanza.find('feature[var="muc_temporary"]').length,
                             'unmoderated': $stanza.find('feature[var="muc_unmoderated"]').length,
                             'label_desc': __('Description:'),
+                            'label_server': __('Server:'),
                             'label_occ': __('Occupants:'),
                             'label_features': __('Features:'),
                             'label_requires_auth': __('Requires authentication'),

+ 1 - 0
src/templates/room_description.html

@@ -1,5 +1,6 @@
 <!-- FIXME: check markup in mockup -->
 <div class="room-info">
+<p class="room-info"><strong>{{{label_server}}}</strong> {{{server}}}</p>
 <p class="room-info"><strong>{{{label_desc}}}</strong> {{{desc}}}</p>
 <p class="room-info"><strong>{{{label_occ}}}</strong> {{{occ}}}</p>
 <p class="room-info"><strong>{{{label_features}}}</strong>