From 08a792b68a60dda4a0b990bdb31bcc439265e479 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 22 Apr 2012 10:11:30 +0000 Subject: [PATCH] handle cantPlay in clip lists --- static/js/pandora/clipList.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/static/js/pandora/clipList.js b/static/js/pandora/clipList.js index ca98f68c5..4007758f3 100644 --- a/static/js/pandora/clipList.js +++ b/static/js/pandora/clipList.js @@ -170,6 +170,8 @@ pandora.ui.clipList = function(videoRatio) { censored: pandora.site.capabilities.canPlayClips[pandora.user.level] < result.data.rightslevel ? [{'in': partsAndPoints.points[0], out: partsAndPoints.points[1]}] : [], + censoredIcon: pandora.site.cantPlay.icon, + censoredTooltip: pandora.site.cantPlay.text, height: height, 'in': partsAndPoints.points[0], out: partsAndPoints.points[1], @@ -184,9 +186,17 @@ pandora.ui.clipList = function(videoRatio) { }) .addClass('OxTarget') .bindEvent({ + censored: function() { + pandora.URL.push(pandora.site.cantPlay.link); + }, // doubleclick opens item - singleclick: function() { - $player.$element.is('.OxSelectedVideo') && $player.togglePaused(); + singleclick: function(e) { + if ( + $player.$element.is('.OxSelectedVideo') + && !$(e.target).is('.OxCensoredIcon') + ) { + $player.togglePaused(); + } } }); $img.replaceWith($player.$element);