fix chat resizing of modal to work with flexbox implementation

v1.18.x
Julian Lam 7 years ago
parent 3d74fc8220
commit 5c3c608109

@ -190,7 +190,7 @@ define('chat', [
return; return;
} }
chatModal.find('.chat-content').css('height', module.calculateChatListHeight(chatModal)); chatModal.find('.modal-body').css('height', module.calculateChatListHeight(chatModal));
}); });
chatModal.draggable({ chatModal.draggable({
@ -346,12 +346,8 @@ define('chat', [
}; };
module.calculateChatListHeight = function (modalEl) { module.calculateChatListHeight = function (modalEl) {
var totalHeight = modalEl.find('.modal-content').outerHeight() - modalEl.find('.modal-header').outerHeight(); // Formula: modal height minus header height. Simple(tm).
var padding = parseInt(modalEl.find('.modal-body').css('padding-top'), 10) + parseInt(modalEl.find('.modal-body').css('padding-bottom'), 10); return modalEl.find('.modal-content').outerHeight() - modalEl.find('.modal-header').outerHeight();
var contentMargin = parseInt(modalEl.find('.chat-content').css('margin-top'), 10) + parseInt(modalEl.find('.chat-content').css('margin-bottom'), 10);
var inputGroupHeight = modalEl.find('.input-group').outerHeight();
return totalHeight - padding - contentMargin - inputGroupHeight;
}; };
module.minimize = function (uuid) { module.minimize = function (uuid) {

Loading…
Cancel
Save