Commit 5e97db95 authored by JC Brand's avatar JC Brand

Add a close button on the occupants sidebar

parent 8c983ab2
......@@ -8494,10 +8494,18 @@ body.reset {
border-left: 1px solid #666;
border-bottom-right-radius: 4px;
padding: 0.5em; }
#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-heading,
#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-heading {
font-family: "Century Gothic", futura, "URW Gothic L", Verdana, sans-serif;
padding: 0.3em 0; }
#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-header,
#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-header {
display: flex;
flex-direction: column; }
#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-header .hide-occupants,
#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-header .hide-occupants {
align-self: flex-end;
cursor: pointer; }
#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .occupants-header .occupants-heading,
#conversejs .chatroom .box-flyout .chatroom-body .occupants .occupants-header .occupants-heading {
font-family: "Century Gothic", futura, "URW Gothic L", Verdana, sans-serif;
padding: 0.3em 0; }
#conversejs.converse-embedded .chatroom .box-flyout .chatroom-body .occupants .chatroom-features,
#conversejs .chatroom .box-flyout .chatroom-body .occupants .chatroom-features {
width: 100%; }
......
......@@ -120,9 +120,17 @@
border-bottom-right-radius: $chatbox-border-radius;
padding: 0.5em;
.occupants-heading {
font-family: $heading-font;
padding: 0.3em 0;
.occupants-header {
display: flex;
flex-direction: column;
.hide-occupants {
align-self: flex-end;
cursor: pointer;
}
.occupants-heading {
font-family: $heading-font;
padding: 0.3em 0;
}
}
.chatroom-features {
......
......@@ -499,6 +499,7 @@
'click .send-button': 'onFormSubmitted',
'click .toggle-call': 'toggleCall',
'click .toggle-occupants': 'toggleOccupants',
'click .hide-occupants': 'hideOccupants',
'click .toggle-smiley ul.emoji-picker li': 'insertEmoji',
'click .toggle-smiley': 'toggleEmojiMenu',
'click .upload-file': 'toggleFileUpload',
......@@ -710,6 +711,19 @@
this.occupantsview.setOccupantsHeight();
},
hideOccupants (ev, preserve_state) {
/* Show or hide the right sidebar containing the chat
* occupants (and the invite widget).
*/
if (ev) {
ev.preventDefault();
ev.stopPropagation();
}
this.model.save({'hidden_occupants': true});
this.setOccupantsVisibility();
this.scrollDown();
},
toggleOccupants (ev, preserve_state) {
/* Show or hide the right sidebar containing the chat
* occupants (and the invite widget).
......
<!-- <div class="occupants"> -->
<p class="occupants-heading">{{{o.label_occupants}}}</p>
<div class="occupants-header">
<i class="hide-occupants fa fa-times"></i>
<p class="occupants-heading">{{{o.label_occupants}}}</p>
</div>
<ul class="occupant-list"></ul>
<div class="chatroom-features"></div>
<!-- </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