mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
Added link to load more chat-messages using new GET_CHAT_MESSAGES
This commit is contained in:
parent
5592c4b0fe
commit
5f81daed0a
7 changed files with 37 additions and 7 deletions
|
@ -556,9 +556,16 @@ var pad = {
|
|||
pad.collabClient.setOnInternalAction(pad.handleCollabAction);
|
||||
|
||||
// load initial chat-messages
|
||||
var chatHead = clientVars.chatHead;
|
||||
var start = Math.max(chatHead - 100, 0);
|
||||
pad.collabClient.sendMessage({"type": "GET_CHAT_MESSAGES", "start": start, "end": chatHead});
|
||||
if(clientVars.chatHead != -1)
|
||||
{
|
||||
var chatHead = clientVars.chatHead;
|
||||
var start = Math.max(chatHead - 100, 0);
|
||||
pad.collabClient.sendMessage({"type": "GET_CHAT_MESSAGES", "start": start, "end": chatHead});
|
||||
}
|
||||
else // there are no messages
|
||||
{
|
||||
$("#chatloadmessages").css("display", "none");
|
||||
}
|
||||
|
||||
function postAceInit()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue