2009-07-15 16:39:28 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<style>
|
|
|
|
.hide {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
<script src="/static/js/jquery.js"></script>
|
|
|
|
<script>
|
|
|
|
$(function(){
|
|
|
|
$.getJSON('/poster/json?imdb={{ imdb }}', function(posters) {
|
|
|
|
$("#loading").hide();
|
|
|
|
$.each(posters, function(key, urls) {
|
|
|
|
var id = 'row' + key.replace('.', '_');
|
|
|
|
var row = '<tr id="'+id+'">';
|
2009-07-15 18:19:56 +00:00
|
|
|
row += '<td id="'+id+'_title" valign="top">' + key + '</td>';
|
2009-07-15 16:39:28 +00:00
|
|
|
row += '<td>';
|
2009-07-15 18:19:56 +00:00
|
|
|
$.each(urls, function(i, poster) {
|
|
|
|
row += '<div style="float: left; height: 280px;padding-right: 4px;"><img src="'+poster.url+'" height="256">';
|
|
|
|
row += '<div>' + poster.width + 'x'+ poster.height + '</div></div>';
|
2009-07-15 16:39:28 +00:00
|
|
|
});
|
2009-07-15 18:19:56 +00:00
|
|
|
row += '</td>';
|
2009-07-15 16:39:28 +00:00
|
|
|
row += '</tr>';
|
|
|
|
$("#posters").append(row);
|
|
|
|
$('#'+id+'_title').click(function() {
|
|
|
|
$('#'+id+' img, #'+id+' div').toggleClass("hide");
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="loading">loading...</div>
|
|
|
|
<table id="posters">
|
|
|
|
|
|
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|