chat controls now hidden instead of taking up space in chat modal

This commit is contained in:
Julian Lam
2016-02-23 13:01:29 -05:00
parent a0a98e64b7
commit 322d4052b0
2 changed files with 10 additions and 3 deletions

View File

@@ -277,6 +277,13 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
Chats.delete(messageId, data.roomId);
});
chatModal.find('[component="chat/controlsToggle"]').on('click', function() {
var messagesEl = chatModal.find('[component="chat/messages"]');
chatModal.find('[component="chat/controls"]').toggle();
messagesEl.css('height', module.calculateChatListHeight(chatModal));
});
Chats.addSinceHandler(chatModal.attr('roomId'), chatModal.find('.chat-content'), chatModal.find('[data-since]'));
Chats.addRenameHandler(chatModal.attr('roomId'), chatModal.find('[component="chat/room/name"]'));
@@ -375,7 +382,7 @@ define('chat', ['components', 'taskbar', 'string', 'sounds', 'forum/chats', 'tra
sinceHeight = modalEl.find('.since-bar').outerHeight(true),
inputGroupHeight = modalEl.find('.input-group').outerHeight();
return totalHeight - padding - contentMargin - sinceHeight - inputGroupHeight;
return totalHeight - padding - contentMargin - inputGroupHeight;
};
module.minimize = function(uuid) {