From aa2c38548cdc0ef2ad3ccd13e4460452872ee719 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Sun, 19 Oct 2014 15:09:29 +0200 Subject: [PATCH] Tweak participants' toggle so that widths don't need to be hardcoded. --- converse.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/converse.js b/converse.js index 26d503593..a4f5203e6 100644 --- a/converse.js +++ b/converse.js @@ -2264,19 +2264,17 @@ if (!this.model.get('hidden_occupants')) { this.model.save({hidden_occupants: true}); $el.removeClass('icon-hide-users').addClass('icon-show-users'); - this.$('div.participants').animate({width: 0}).hide(); - this.$('.chat-area').animate({width: '100%'}, $.proxy(function () { + this.$('form.sendXMPPMessage, .chat-area').animate({width: '100%'}); + this.$('div.participants').animate({width: 0}, $.proxy(function () { this.scrollDown(); }, this)); - this.$('form.sendXMPPMessage').animate({width: '100%'}); } else { this.model.save({hidden_occupants: false}); $el.removeClass('icon-show-users').addClass('icon-hide-users'); - this.$('.chat-area').animate({width: '200px'}, $.proxy(function () { - this.$('div.participants').css({width: '100px'}).show(); + this.$('.chat-area, form.sendXMPPMessage').css({width: ''}); + this.$('div.participants').show().animate({width: 'auto'}, $.proxy(function () { this.scrollDown(); }, this)); - this.$('form.sendXMPPMessage').animate({width: '200px'}); } },