From 0ef3aa0ad36490fb32193a03a448a4db235ddea7 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 19 Oct 2011 11:49:49 +0000 Subject: [PATCH] make click on clip in clips view open the item at the appropriate position --- static/js/pandora/ui/itemClips.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/static/js/pandora/ui/itemClips.js b/static/js/pandora/ui/itemClips.js index 473630e0..bd242684 100644 --- a/static/js/pandora/ui/itemClips.js +++ b/static/js/pandora/ui/itemClips.js @@ -7,7 +7,7 @@ pandora.ui.itemClips = function(options) { margin: '4px' }) .bindEvent({ - mousedown: mousedown + singleclick: singleclick }); self.options = Ox.extend({ @@ -43,8 +43,7 @@ pandora.ui.itemClips = function(options) { that.append($item); }); - function mousedown(data) { - Ox.print('MOUSEDOWN', data) + function singleclick(data) { var $img, $item, $target = $(data.target), $video, points; if ($target.is('.OxSpecialTarget')) { $item = $target.parent().parent(); @@ -73,7 +72,17 @@ pandora.ui.itemClips = function(options) { .addClass('OxTarget OxSpecialTarget') .bindEvent({ doubleclick: function() { - + var item = self.options.id, + set = { + item: item, + itemView: pandora.user.ui.videoView + }; + set['videoPoints.' + item] = { + 'in': points[0], + out: points[1], + position: points[0] + }; + pandora.UI.set(set); }, singleclick: function() { $player.togglePaused();