From ac448937abd4744195bcf17003315f39ee32ba3b Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 10 Jan 2013 00:01:38 +0000 Subject: [PATCH 1/2] fix egils fix of time delta resolves #1345 --- src/static/js/broadcast.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/static/js/broadcast.js b/src/static/js/broadcast.js index 05e4c1742..6bd135bd2 100644 --- a/src/static/js/broadcast.js +++ b/src/static/js/broadcast.js @@ -244,14 +244,14 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro if (broadcasting) applyChangeset(changesetForward, revision + 1, false, timeDelta); } -/* + /* At this point, we must be certain that the changeset really does map from the current revision to the specified revision. Any mistakes here will cause the whole slider to get out of sync. */ function applyChangeset(changeset, revision, preventSliderMovement, timeDelta) - { + { // disable the next 'gotorevision' call handled by a timeslider update if (!preventSliderMovement) { @@ -271,7 +271,8 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro Changeset.mutateTextLines(changeset, padContents); padContents.currentRevision = revision; - padContents.currentTime += timeDelta; + padContents.currentTime += timeDelta * 1000; + debugLog('Time Delta: ', timeDelta) updateTimer(); @@ -293,8 +294,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro return str; } - - var date = new Date(padContents.currentTime); var dateFormat = function() { @@ -319,7 +318,6 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro $('#timer').html(dateFormat()); - var revisionDate = html10n.get("timeslider.saved", { "day": date.getDate(), "month": [ From 730266256c9702cb5858bd75f29898e0f6d915c8 Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 10 Jan 2013 15:14:10 +0000 Subject: [PATCH 2/2] fix #1341 by adding css to stop highlighting --- src/static/css/timeslider.css | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/static/css/timeslider.css b/src/static/css/timeslider.css index d786d89ba..b3c201847 100644 --- a/src/static/css/timeslider.css +++ b/src/static/css/timeslider.css @@ -32,6 +32,12 @@ background-image: url(../../static/img/timeslider_background.png); height: 63px; margin: 0 9px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } #timeslider #timeslider-slider { height: 61px; @@ -140,6 +146,14 @@ #padmain { top: 0px !important } +#editbar{ + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} #editbarright { float: right }