diff --git a/static/html/itemInfo.html b/static/html/itemInfo.html index ef34d6b5..35f86e30 100644 --- a/static/html/itemInfo.html +++ b/static/html/itemInfo.html @@ -1,79 +1,85 @@
-
- +
+
+ +
+
+ +
+
-
-
+
+
${title}
-
+
${director}
- Country: ${country} + Country: ${country} - Year: ${year} + Year: ${year} - Language: ${language} + Language: ${language} - Runtime: ${runtime} + Runtime: ${runtime}
- Alternative Title(s): {alternative_titles} + Alternative Title(s): ${alternative_titles}
- Writer: ${writer} + Writer: ${writer}
- Producer: ${producer} + Producer: ${producer}
- Cast: ${cast} + Cast: ${cast}
- Genre: ${genre} + Genre: ${genre}
- Keywords: ${keyword} + Keywords: ${keyword}
- Summary: FIXME + Summary: FIXME
FIXTRIVA
- Release Date: ${release_date} + Release Date: ${release_date}
- Budget: ${budget} + Budget: ${budget} - Gross: ${gross} + Gross: ${gross} - Profit: ${profit} + Profit: ${profit}
- Rating: ${rating} + Rating: ${rating} - Votes: ${votes} + Votes: ${votes}
FIXME: movie connections
- Reviews: ${reviewsHtml} + Reviews: ${reviewsHtml}
diff --git a/static/js/pandora/ui/item.js b/static/js/pandora/ui/item.js index 7851790f..24cf831a 100644 --- a/static/js/pandora/ui/item.js +++ b/static/js/pandora/ui/item.js @@ -105,9 +105,12 @@ pandora.ui.item = function() { } else { $.get('/static/html/itemInfo.html', {}, function(template) { //Ox.print(template); + var posterRatio = result.data.poster.width / result.data.poster.height; + result.data.posterWidth = posterRatio > 1 ? 256 : Math.round(256 * posterRatio); + result.data.posterHeight = posterRatio < 1 ? 256 : Math.round(256 / posterRatio); + result.data.posterLeft = Math.floor((256 - result.data.posterWidth) / 2); pandora.$ui.contentPanel.replaceElement(1, - pandora.$ui.item = Ox.Element() - .append($.tmpl(template, result.data)) + pandora.$ui.item = Ox.Element().append($.tmpl(template, result.data)) ); }); }