Commit 160ab345 authored by JC Brand's avatar JC Brand

Rename ids of two modals

parent 1a161ad2
......@@ -11,7 +11,7 @@
}
}
#room-details-modal {
#muc-details-modal {
.features-list {
margin-left: 1em;
}
......
......@@ -2454,9 +2454,9 @@ describe("Groupchats", function () {
const jid = 'room@conference.example.org';
const view = _converse.chatboxviews.get(jid);
const info_el = view.el.querySelector(".show-room-details-modal");
const info_el = view.el.querySelector(".show-muc-details-modal");
info_el.click();
const modal = _converse.api.modal.get('room-details-modal');
const modal = _converse.api.modal.get('muc-details-modal');
await u.waitUntil(() => u.isVisible(modal.el), 1000);
let features_list = modal.el.querySelector('.features-list');
......@@ -4812,7 +4812,7 @@ describe("Groupchats", function () {
const roomspanel = _converse.chatboxviews.get('controlbox').roomspanel;
roomspanel.el.querySelector('.show-list-muc-modal').click();
mock.closeControlBox(_converse);
const modal = _converse.api.modal.get('list-chatrooms-modal');
const modal = _converse.api.modal.get('muc-list-modal');
await u.waitUntil(() => u.isVisible(modal.el), 1000);
spyOn(_converse.ChatRoom.prototype, 'getDiscoInfo').and.callFake(() => Promise.resolve());
roomspanel.delegateEvents(); // We need to rebind all events otherwise our spy won't be called
......@@ -4889,7 +4889,7 @@ describe("Groupchats", function () {
const roomspanel = _converse.chatboxviews.get('controlbox').roomspanel;
roomspanel.el.querySelector('.show-list-muc-modal').click();
mock.closeControlBox(_converse);
const modal = _converse.api.modal.get('list-chatrooms-modal');
const modal = _converse.api.modal.get('muc-list-modal');
await u.waitUntil(() => u.isVisible(modal.el), 1000);
const server_input = modal.el.querySelector('input[name="server"]');
expect(server_input.value).toBe('muc.example.org');
......@@ -4906,7 +4906,7 @@ describe("Groupchats", function () {
const roomspanel = _converse.chatboxviews.get('controlbox').roomspanel;
roomspanel.el.querySelector('.show-list-muc-modal').click();
mock.closeControlBox(_converse);
const modal = _converse.api.modal.get('list-chatrooms-modal');
const modal = _converse.api.modal.get('muc-list-modal');
await u.waitUntil(() => u.isVisible(modal.el), 1000);
spyOn(_converse.ChatRoom.prototype, 'getDiscoInfo').and.callFake(() => Promise.resolve());
roomspanel.delegateEvents(); // We need to rebind all events otherwise our spy won't be called
......
......@@ -204,7 +204,7 @@ describe("A groupchat shown in the groupchats list", function () {
const info_el = _converse.rooms_list_view.el.querySelector(".room-info");
info_el.click();
const modal = _converse.api.modal.get('room-details-modal');
const modal = _converse.api.modal.get('muc-details-modal');
await u.waitUntil(() => u.isVisible(modal.el), 1000);
let els = modal.el.querySelectorAll('p.room-info');
expect(els[0].textContent).toBe("Name: A Dark Cave")
......
......@@ -562,7 +562,7 @@ export const ChatRoomView = ChatBoxView.extend({
'i18n_text': __('Details'),
'i18n_title': __('Show more information about this groupchat'),
'handler': ev => this.showRoomDetailsModal(ev),
'a_class': 'show-room-details-modal',
'a_class': 'show-muc-details-modal',
'icon_class': 'fa-info-circle',
'name': 'details'
});
......
......@@ -4,7 +4,7 @@ import { __ } from '../i18n';
export default BootstrapModal.extend({
id: "room-details-modal",
id: "muc-details-modal",
initialize () {
BootstrapModal.prototype.initialize.apply(this, arguments);
......
......@@ -82,7 +82,7 @@ function toggleRoomInfo (ev) {
export default BootstrapModal.extend({
id: "list-chatrooms-modal",
id: "muc-list-modal",
persistent: true,
initialize () {
......
......@@ -50,7 +50,7 @@ export default (o) => {
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="room-details-modal-label">${o.display_name}</h5>
<h5 class="modal-title" id="muc-details-modal-label">${o.display_name}</h5>
${modal_header_close_button}
</div>
<div class="modal-body">
......
......@@ -56,7 +56,7 @@ export default (o) => {
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="list-chatrooms-modal-label">${i18n_list_chatrooms}</h5>
<h5 class="modal-title" id="muc-list-modal-label">${i18n_list_chatrooms}</h5>
${modal_header_close_button}
</div>
<div class="modal-body d-flex flex-column">
......
......@@ -3,7 +3,7 @@ import { html } from "lit-html";
export default (o) => html`
<div class="d-flex controlbox-padded">
<span class="w-100 controlbox-heading controlbox-heading--groupchats">${o.heading_chatrooms}</span>
<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="#muc-list-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 class="list-container list-container--openrooms hidden"></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