mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 07:56:16 -04:00
Timeslider is working
This commit is contained in:
parent
44aa476ec0
commit
867525945d
7 changed files with 84 additions and 88 deletions
|
@ -68,6 +68,10 @@ exports.handleMessage = function(client, message)
|
|||
{
|
||||
handleClientReady(client, message);
|
||||
}
|
||||
else if(message.type == "CHANGESET_REQ")
|
||||
{
|
||||
handleChangesetRequest(client, message);
|
||||
}
|
||||
//if the message type is unkown, throw an exception
|
||||
else
|
||||
{
|
||||
|
@ -85,6 +89,24 @@ function handleClientReady(client, message)
|
|||
})
|
||||
}
|
||||
|
||||
function handleChangesetRequest(client, message)
|
||||
{
|
||||
var granularity = message.data.granularity;
|
||||
var start = message.data.start;
|
||||
var end = start + (100 * granularity);
|
||||
var padId = message.padId;
|
||||
|
||||
getChangesetInfo(padId, start, end, granularity, function(err, changesetInfo)
|
||||
{
|
||||
if(err) throw err;
|
||||
|
||||
var data = changesetInfo;
|
||||
data.requestID = message.data.requestID;
|
||||
|
||||
client.send({type: "CHANGESET_REQ", data: data});
|
||||
});
|
||||
}
|
||||
|
||||
function createTimesliderClientVars (padId, callback)
|
||||
{
|
||||
var clientVars = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue