mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-17 11:11:04 +01:00
small tweak to chat height
This commit is contained in:
@@ -30,12 +30,7 @@ define('forum/chats', ['string', 'sounds'], function(S, sounds) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Chats.isCurrentChat = function(uid) {
|
Chats.isCurrentChat = function(uid) {
|
||||||
uid = parseInt(uid, 10);
|
return Chats.getRecipientUid() === parseInt(uid, 10);
|
||||||
if (Chats.getRecipientUid() === uid) {
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Chats.addEventListeners = function() {
|
Chats.addEventListeners = function() {
|
||||||
@@ -134,16 +129,12 @@ define('forum/chats', ['string', 'sounds'], function(S, sounds) {
|
|||||||
var messagesList = $('.expanded-chat ul');
|
var messagesList = $('.expanded-chat ul');
|
||||||
|
|
||||||
if (messagesList.length) {
|
if (messagesList.length) {
|
||||||
var inputEl = $('.chat-input'),
|
var margin = $('.expanded-chat ul').outerHeight(true) - $('.expanded-chat ul').height(),
|
||||||
viewportHeight = $(window).height(),
|
inputHeight = $('.chat-input').outerHeight(true),
|
||||||
margin = $('.expanded-chat ul').outerHeight() - $('.expanded-chat ul').height(),
|
|
||||||
inputHeight = inputEl.outerHeight(),
|
|
||||||
fromTop = messagesList.offset().top;
|
fromTop = messagesList.offset().top;
|
||||||
|
|
||||||
messagesList.height(viewportHeight-(fromTop+inputHeight+(margin*4)));
|
messagesList.height($(window).height() - (fromTop + inputHeight + (margin * 4)));
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Chats.notifyTyping = function(toUid, typing) {
|
Chats.notifyTyping = function(toUid, typing) {
|
||||||
|
|||||||
Reference in New Issue
Block a user