Merge pull request #840 from redhog/master

Bugfix for readonly timeslider
releases-1.1.1
John McLear 2012-07-05 10:34:55 -07:00
commit 34fdfcb253
1 changed files with 24 additions and 13 deletions

View File

@ -1062,18 +1062,29 @@ function handleChangesetRequest(client, message)
var granularity = message.data.granularity; var granularity = message.data.granularity;
var start = message.data.start; var start = message.data.start;
var end = start + (100 * granularity); var end = start + (100 * granularity);
var padId = message.padId; var padIds;
//build the requested rough changesets and send them back async.series([
getChangesetInfo(padId, start, end, granularity, function(err, changesetInfo) function (callback) {
{ readOnlyManager.getIds(message.padId, function(err, value) {
ERR(err); if(ERR(err, callback)) return;
padIds = value;
var data = changesetInfo; callback();
data.requestID = message.data.requestID; });
},
client.json.send({type: "CHANGESET_REQ", data: data}); function (callback) {
}); //build the requested rough changesets and send them back
getChangesetInfo(padIds.padId, start, end, granularity, function(err, changesetInfo)
{
ERR(err);
var data = changesetInfo;
data.requestID = message.data.requestID;
client.json.send({type: "CHANGESET_REQ", data: data});
});
}
]);
} }
@ -1297,7 +1308,7 @@ function composePadChangesets(padId, startNum, endNum, callback)
function(callback) function(callback)
{ {
padManager.getPad(padId, function(err, _pad) padManager.getPad(padId, function(err, _pad)
{ {
if(ERR(err, callback)) return; if(ERR(err, callback)) return;
pad = _pad; pad = _pad;
callback(); callback();