Added link to load more chat-messages using new GET_CHAT_MESSAGES

This commit is contained in:
mluto 2013-01-07 17:36:03 +01:00
parent 5592c4b0fe
commit 5f81daed0a
7 changed files with 37 additions and 7 deletions

View file

@ -411,7 +411,10 @@ function getCollabClient(ace2editor, serverVars, initialUserInfo, options, _pad)
if(!chat.gotInitalMessages)
{
chat.scrollDown();
chat.gotInitalMessages = true;
chat.gotInitalMessages = true;
chat.historyPointer = clientVars.chatHead - msg.messages.length;
if(chat.historyPointer == -1) // there are less than 100 messages
$("#chatloadmessages").css("display", "none");
}
}
else if (msg.type == "SERVER_MESSAGE")