From 867525945d2439ae0cd0ed4907da62f9c6d00419 Mon Sep 17 00:00:00 2001 From: Peter 'Pita' Martischka Date: Mon, 20 Jun 2011 15:37:41 +0100 Subject: [PATCH] Timeslider is working --- node/TimesliderMessageHandler.js | 22 ++++++ package.json | 2 +- static/img/crushed_button_depressed.png | Bin 0 -> 4134 bytes static/img/pause.png | Bin 0 -> 2883 bytes static/js/broadcast.js | 44 +++++++++-- static/js/broadcast_slider.js | 6 +- static/timeslider.html | 98 +++++------------------- 7 files changed, 84 insertions(+), 88 deletions(-) create mode 100644 static/img/crushed_button_depressed.png create mode 100644 static/img/pause.png diff --git a/node/TimesliderMessageHandler.js b/node/TimesliderMessageHandler.js index 8e589443c..2212c110f 100644 --- a/node/TimesliderMessageHandler.js +++ b/node/TimesliderMessageHandler.js @@ -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 = { diff --git a/package.json b/package.json index 9663efe2b..3bf789ece 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ ], "dependencies" : { "socket.io" : "0.6.18", - "ueberDB" : "0.0.7", + "ueberDB" : "0.0.8", "async" : "0.1.9", "joose" : "3.18.0", "express" : "2.3.10", diff --git a/static/img/crushed_button_depressed.png b/static/img/crushed_button_depressed.png new file mode 100644 index 0000000000000000000000000000000000000000..d75dcce289051293d69a9be79874492ef7959be1 GIT binary patch literal 4134 zcmV+>5ZUjEP)|D^_ww@lRz|vCuzLs)$;-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b8!N(AHjr#GA#HJrBdX92?a{8h4?P!NtpU*|!WHqB4TJRgxxk1-kjTdF>4(El zwC4gZ7Cs20l0Gc5)A^054XqexE^?`l9qeHj`#@&`m#O-^ACdiy;zJ^lSdwAp*YB@# zIPgg7WPvFtvQi=xkUaU!?F8R*RZV&7Q6D?l!>$SK0)IBV@gD$kj9)~*#pChV@7*J-_~&vitfelp^3z-l6|4d{IfDIkImjD0&07*qoM6N<$f+oxE@&Et; literal 0 HcmV?d00001 diff --git a/static/img/pause.png b/static/img/pause.png new file mode 100644 index 0000000000000000000000000000000000000000..657782c0fac9f6e6058803bd276a36b73b83d1de GIT binary patch literal 2883 zcmV-J3%vA+P)KLZ*U+IBfRsybQWXdwQbLP>6pAqfylh#{fb6;Z(vMMVS~$e@S=j*ftg6;Uhf59&ghTmgWD0l;*T zI709Y^p6lP1rIRMx#05C~cW=H_Aw*bJ-5DT&Z2n+x)QHX^p z00esgV8|mQcmRZ%02D^@S3L16t`O%c004NIvOKvYIYoh62rY33S640`D9%Y2D-rV&neh&#Q1i z007~1e$oCcFS8neI|hJl{-P!B1ZZ9hpmq0)X0i`JwE&>$+E?>%_LC6RbVIkUx0b+_+BaR3cnT7Zv!AJxW zizFb)h!jyGOOZ85F;a?DAXP{m@;!0_IfqH8(HlgRxt7s3}k3K`kFu>>-2Q$QMFfPW!La{h336o>X zu_CMttHv6zR;&ZNiS=X8v3CR#fknUxHUxJ0uoBa_M6WNWeqIg~6QE69c9o#eyhGvpiOA@W-aonk<7r1(?fC{oI5N*U!4 zfg=2N-7=cNnjjOr{yriy6mMFgG#l znCF=fnQv8CDz++o6_Lscl}eQ+l^ZHARH>?_s@|##Rr6KLRFA1%Q+=*RRWnoLsR`7U zt5vFIcfW3@?wFpwUVxrVZ>QdQz32KIeJ}k~{cZZE^+ya? z2D1z#2HOnI7(B%_ac?{wFUQ;QQA1tBKtrWrm0_3Rgps+?Jfqb{jYbcQX~taRB;#$y zZN{S}1|}gUOHJxc?wV3fxuz+m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