fix scrollbar on chat + compress css files + add remove filter inlist
This commit is contained in:
@@ -97,9 +97,6 @@ databap.pageInit = function()
|
||||
|
||||
//Loading the chat
|
||||
self.initScrollBar('#chat_container', '#chat_messages_box', '#chat_messages');
|
||||
$('#chat_container').find('.thumb')
|
||||
.mousedown(function(){self.tmp('scrolling', true);})
|
||||
.mouseup(function(){self.tmp('scrolling', false);});
|
||||
|
||||
//Loading Chans
|
||||
setChanButton();
|
||||
@@ -387,6 +384,8 @@ function switchChan(sChanKeyName)
|
||||
//Show current channel messages
|
||||
databap.getMainElem('#chat_messages').find('p').hide();
|
||||
databap.getMainElem('#chat_messages').find('p.class_'+sChanKeyName+', p.class_'+databap.consts.all_chan_id).show();
|
||||
|
||||
//Update scrollbar
|
||||
databap.updateScrollBar(self.tmp('scrolling')?'relative':'bottom');
|
||||
|
||||
//Show Current channel members
|
||||
@@ -403,7 +402,6 @@ function syncUnreadMsg()
|
||||
databap.tmp('unread_msg'),
|
||||
function(sChanName, iUnreadMsg)
|
||||
{
|
||||
//debug('chan '+sChanName+' : '+iUnreadMsg+' unread messages');
|
||||
iCountUnread += iUnreadMsg;
|
||||
}
|
||||
);
|
||||
@@ -644,6 +642,7 @@ function add_message(e)
|
||||
function refresh_chat(bReset)
|
||||
{
|
||||
var bReset = (typeof bReset != 'undefined' && bReset == true);
|
||||
self.tmp('scrolling', (!bReset && !databap.isScrollBarAtBottom()));
|
||||
if(typeof oChatTimer != "undefined") clearTimeout(oChatTimer);
|
||||
if(databap.vars.current_page == 'chat')
|
||||
{
|
||||
@@ -822,6 +821,9 @@ function addMessage(message_info, bReset)
|
||||
iUnreadCount = (databap.tmp(['unread_msg', sUnreadChanName]) || 0) + 1;
|
||||
databap.tmp(['unread_msg', sUnreadChanName], iUnreadCount);
|
||||
}
|
||||
|
||||
//Move to bottom if user is typing
|
||||
if(message_info.id_user===databap.vars.user_id) self.tmp('scrolling', false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user