From a14441d971225259ca46519250df60ff39461f35 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Tue, 16 Aug 2011 13:28:12 +0000 Subject: [PATCH] make video preview links work --- static/js/pandora/ui/videoPreview.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/static/js/pandora/ui/videoPreview.js b/static/js/pandora/ui/videoPreview.js index 24839b4..43c27fb 100644 --- a/static/js/pandora/ui/videoPreview.js +++ b/static/js/pandora/ui/videoPreview.js @@ -21,9 +21,18 @@ pandora.ui.videoPreview = function(data) { }) .bindEvent({ click: function(event) { - pandora.URL.set( - '/' + data.id + '/timeline/' + Ox.formatDuration(event.position, 2) - ); + if (pandora.user.ui.item) { + pandora.$ui[ + pandora.user.ui.itemView == 'player' ? 'player' : 'editor' + ].options({ + position: event.position + }); + } else { + pandora.UI.set('videoPosition|' + data.id, event.position); + pandora.URL.set( + '/' + data.id + '/timeline' //'/' + Ox.formatDuration(event.position, 2) + ); + } } }); function getResolution() {