roomslist: Room name wasn't being shown in confirm dialog

This commit is contained in:
JC Brand 2017-07-13 23:53:42 +02:00
parent 27760a7d51
commit dc7249f07d
2 changed files with 7 additions and 3 deletions

View File

@ -75,7 +75,7 @@
var close_el = _converse.rooms_list_view.el.querySelector(".close-room");
close_el.click();
expect(window.confirm).toHaveBeenCalledWith(
'Are you sure you want to leave the room ""?');
'Are you sure you want to leave the room "lounge"?');
room_els = _converse.rooms_list_view.el.querySelectorAll(".open-room");
expect(room_els.length).toBe(0);
expect(_converse.chatboxes.length).toBe(1);

View File

@ -2,9 +2,13 @@
{[ if (num_unread) { ]}
<span class="msgs-indicator">{{{ num_unread }}}</span>
{[ } ]}
<a class="open-room" data-room-jid="{{{jid}}}" title="{{{open_title}}}" href="#">{{{name}}}</a>
<a class="open-room"
data-room-jid="{{{jid}}}"
title="{{{open_title}}}" href="#">{{{name}}}</a>
<a class="right close-room icon-leave"
data-room-jid="{{{jid}}}" title="{{{info_leave_room}}}" href="#">&nbsp;</a>
data-room-jid="{{{jid}}}"
data-room-name="{{{name}}}"
title="{{{info_leave_room}}}" href="#">&nbsp;</a>
<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>