From e1b07966be12abee7c72a07f7391b544b8ece206 Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 7 Aug 2011 16:30:26 +0000 Subject: [PATCH] make links work in info view --- static/js/pandora/ui/infoView.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/static/js/pandora/ui/infoView.js b/static/js/pandora/ui/infoView.js index 3f35c3f..1a9f3ef 100644 --- a/static/js/pandora/ui/infoView.js +++ b/static/js/pandora/ui/infoView.js @@ -51,8 +51,8 @@ pandora.ui.infoView = function(data) { }) .appendTo($data.$element), $reflection = $('
') + .addClass('OxReflection') .css({ - display: 'block', position: 'absolute', left: margin + 'px', top: margin + posterHeight + 'px', @@ -69,20 +69,15 @@ pandora.ui.infoView = function(data) { position: 'absolute', left: posterLeft + 'px', width: posterWidth + 'px', - height: posterHeight + 'px', - MozTransform: 'scaleY(-1)', - WebkitTransform: 'scaleY(-1)' + height: posterHeight + 'px' }) .appendTo($reflection), $reflectionGradient = $('
') .css({ - display: 'block', position: 'absolute', width: posterSize + 'px', height: posterSize / 2 + 'px' }) - .css('background', '-moz-linear-gradient(top, rgba(16, 16, 16, 0.75), rgba(16, 16, 16, 1))') - .css('background', '-webkit-linear-gradient(top, rgba(16, 16, 16, 0.75), rgba(16, 16, 16, 1))') .appendTo($reflection), $text = $('
') .css({ @@ -91,6 +86,15 @@ pandora.ui.infoView = function(data) { top: margin + 'px', right: margin + 'px' }) + .bind({ + click: function(e) { + var $target = $(e.target); + if ($target.is('.OxLink')) { + Ox.print('LINK', $target.data('link')); + pandora.URL.set($target.data('link')); + } + } + }) .appendTo($data.$element), $browserImages = []; @@ -426,7 +430,10 @@ pandora.ui.infoView = function(data) { function formatValue(value, key) { return (Ox.isArray(value) ? value : [value]).map(function(value) { - return key ? '' + value + '' : value; + return key ? + '' + value + '' + : value; + //return key ? '' + value + '' : value; }).join(', '); }