From 138f5913ad328599aab229c3521ed7093e8b05a5 Mon Sep 17 00:00:00 2001 From: rolux Date: Wed, 22 Jan 2014 17:10:13 +0000 Subject: [PATCH] update info embed --- static/js/embedInfo.js | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/static/js/embedInfo.js b/static/js/embedInfo.js index aaf58d902..44a369e4a 100644 --- a/static/js/embedInfo.js +++ b/static/js/embedInfo.js @@ -4,12 +4,7 @@ pandora.ui.embedInfo = function() { var data, item = pandora.user.ui.item, - textCSS = { - marginTop: '8px', - fontWeight: 'bold', - fontSize: '13px', - textAlign: 'center' - }, + margin = 16, that = Ox.Element(), $icon, $reflection, $reflectionIcon, $reflectionGradient, $text; @@ -25,7 +20,7 @@ pandora.ui.embedInfo = function() { .attr({src: '/' + item + '/poster512.jpg'}) .css({ position: 'absolute', - top: '8px', + top: margin + 'px', cursor: 'pointer' }) .appendTo(that); @@ -54,19 +49,28 @@ pandora.ui.embedInfo = function() { $text = Ox.$('
') .css({ position: 'absolute', - left: '8px', - right: '8px' + left: margin + 'px', + right: margin + 'px' }) .appendTo(that); Ox.$('
') - .css(textCSS) + .css({ + fontWeight: 'bold', + fontSize: '13px', + textAlign: 'center' + }) .html(data.title + (data.year ? ' (' + data.year + ')' : '')) .appendTo($text); if (data.director) { Ox.$('
') - .css(textCSS) + .css({ + marginTop: '8px', + fontWeight: 'bold', + fontSize: '13px', + textAlign: 'center' + }) .html(data.director.map(function(director) { // fixme: there should be a utils method for this return '