v1.18.x
barisusakli 8 years ago
parent f9083dc364
commit 5c70e503aa

@ -26,8 +26,11 @@ define('chat', [
module.loadChatsDropdown(chatsListEl); module.loadChatsDropdown(chatsListEl);
}); });
chatsListEl.on('click', '[data-roomid]', function() { chatsListEl.on('click', '[data-roomid]', function(ev) {
var roomId = this.getAttribute('data-roomid'); if ($(ev.target).parents('.user-link').length) {
return;
}
var roomId = $(this).attr('data-roomid');
if (!ajaxify.currentPage.match(/^chats\//)) { if (!ajaxify.currentPage.match(/^chats\//)) {
app.openChat(roomId); app.openChat(roomId);
} else { } else {
@ -339,7 +342,7 @@ define('chat', [
}); });
}; };
module.disableMobileBehaviour = function(modalEl) { module.disableMobileBehaviour = function() {
app.toggleNavbar(true); app.toggleNavbar(true);
}; };
@ -347,7 +350,6 @@ define('chat', [
var totalHeight = modalEl.find('.modal-content').outerHeight() - modalEl.find('.modal-header').outerHeight(); var totalHeight = modalEl.find('.modal-content').outerHeight() - modalEl.find('.modal-header').outerHeight();
var padding = parseInt(modalEl.find('.modal-body').css('padding-top'), 10) + parseInt(modalEl.find('.modal-body').css('padding-bottom'), 10); var padding = parseInt(modalEl.find('.modal-body').css('padding-top'), 10) + parseInt(modalEl.find('.modal-body').css('padding-bottom'), 10);
var contentMargin = parseInt(modalEl.find('.chat-content').css('margin-top'), 10) + parseInt(modalEl.find('.chat-content').css('margin-bottom'), 10); var contentMargin = parseInt(modalEl.find('.chat-content').css('margin-top'), 10) + parseInt(modalEl.find('.chat-content').css('margin-bottom'), 10);
var sinceHeight = modalEl.find('.since-bar').outerHeight(true);
var inputGroupHeight = modalEl.find('.input-group').outerHeight(); var inputGroupHeight = modalEl.find('.input-group').outerHeight();
return totalHeight - padding - contentMargin - inputGroupHeight; return totalHeight - padding - contentMargin - inputGroupHeight;

Loading…
Cancel
Save