Commit 380a60ae authored by JC Brand's avatar JC Brand

Two fixes related to occupants toggling

* Empty chat area doesn't resize when hiding occupants.
* Properly change icon when toggling occupants
parent 85463308
...@@ -2004,9 +2004,9 @@ ...@@ -2004,9 +2004,9 @@
#conversejs .chatroom .box-flyout .chatroom-body .chat-area .chat-content { #conversejs .chatroom .box-flyout .chatroom-body .chat-area .chat-content {
padding: 0 0.5em 0 0.5em; } padding: 0 0.5em 0 0.5em; }
#conversejs .chatroom .box-flyout .chatroom-body .chat-area.full { #conversejs .chatroom .box-flyout .chatroom-body .chat-area.full {
max-width: 100%; } min-width: 100%; }
#conversejs .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator { #conversejs .chatroom .box-flyout .chatroom-body .chat-area.full .new-msgs-indicator {
max-width: 100%; } min-width: 100%; }
#conversejs .chatroom .box-flyout .chatroom-body .mentioned { #conversejs .chatroom .box-flyout .chatroom-body .mentioned {
font-weight: bold; } font-weight: bold; }
#conversejs .chatroom .box-flyout .chatroom-body .chat-msg-room { #conversejs .chatroom .box-flyout .chatroom-body .chat-msg-room {
......
...@@ -59,9 +59,9 @@ ...@@ -59,9 +59,9 @@
padding: 0 0.5em 0 0.5em; padding: 0 0.5em 0 0.5em;
} }
&.full { &.full {
max-width: 100%; min-width: 100%;
.new-msgs-indicator { .new-msgs-indicator {
max-width: 100%; min-width: 100%;
} }
} }
} }
......
...@@ -263,16 +263,15 @@ ...@@ -263,16 +263,15 @@
// Bit of a hack, to make sure that the sidebar's state doesn't change // Bit of a hack, to make sure that the sidebar's state doesn't change
this.model.set({hidden_occupants: !this.model.get('hidden_occupants')}); this.model.set({hidden_occupants: !this.model.get('hidden_occupants')});
} }
var $el = this.$('.icon-hide-users');
if (!this.model.get('hidden_occupants')) { if (!this.model.get('hidden_occupants')) {
this.model.save({hidden_occupants: true}); this.model.save({hidden_occupants: true});
$el.removeClass('icon-hide-users').addClass('icon-show-users'); this.$('.icon-hide-users').removeClass('icon-hide-users').addClass('icon-show-users');
this.$('.occupants').addClass('hidden'); this.$('.occupants').addClass('hidden');
this.$('.chat-area').addClass('full'); this.$('.chat-area').addClass('full');
this.scrollDown(); this.scrollDown();
} else { } else {
this.model.save({hidden_occupants: false}); this.model.save({hidden_occupants: false});
$el.removeClass('icon-show-users').addClass('icon-hide-users'); this.$('.icon-show-users').removeClass('icon-show-users').addClass('icon-hide-users');
this.$('.chat-area').removeClass('full'); this.$('.chat-area').removeClass('full');
this.$('div.occupants').removeClass('hidden'); this.$('div.occupants').removeClass('hidden');
this.scrollDown(); this.scrollDown();
......
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