forked from 0x2620/pandora
add info view
This commit is contained in:
parent
02dd13ed2a
commit
40e537a027
2 changed files with 105 additions and 0 deletions
80
static/html/itemInfo.html
Normal file
80
static/html/itemInfo.html
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
<div id="itemInfo">
|
||||||
|
<div style="width:128px; float: left">
|
||||||
|
<img class="icon" src="/${id}/poster.128.jpg">
|
||||||
|
</div>
|
||||||
|
<div style="width:544px; float: left">
|
||||||
|
<div id="movieTitle" class="movieData textLarge textLeft" style="margin-top: 0px; margin-bottom: 2px">
|
||||||
|
${title}
|
||||||
|
</div>
|
||||||
|
<div id="movieDirector" class="movieData textLarge textLeft" style="margin-bottom: 4px">
|
||||||
|
${director}
|
||||||
|
</div>
|
||||||
|
<div id="movieInfo" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span id="movieCountry">
|
||||||
|
<span class="textBold">Country:</span> ${country}
|
||||||
|
</span>
|
||||||
|
<span id="movieYear">
|
||||||
|
<span class="textBold">Year:</span> ${year}
|
||||||
|
</span>
|
||||||
|
<span id="movieLanguage">
|
||||||
|
<span class="textBold">Language:</span> ${language}
|
||||||
|
</span>
|
||||||
|
<span id="movieRuntime">
|
||||||
|
<span class="textBold">Runtime:</span> ${runtime}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id="movieAltTitles" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span class="textBold">Alternative Title(s):</span> {alternative_titles}
|
||||||
|
</div>
|
||||||
|
<div id="movieWriter" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span class="textBold">Writer:</span> ${writer}
|
||||||
|
</div>
|
||||||
|
<div id="movieProducer" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span class="textBold">Producer:</span> ${producer}
|
||||||
|
</div>
|
||||||
|
<div id="movieCast" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span class="textBold">Cast:</span> ${cast}
|
||||||
|
</div>
|
||||||
|
<div id="movieGenre" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span class="textBold">Genre:</span> ${genre}
|
||||||
|
</div>
|
||||||
|
<div id="movieKeywords" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span class="textBold">Keywords:</span> ${keyword}
|
||||||
|
</div>
|
||||||
|
<div id="movieSummary" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span class="textBold">Summary:</span> FIXME
|
||||||
|
</div>
|
||||||
|
<div id="movieTrivia" class="movieData textMedium">
|
||||||
|
FIXTRIVA
|
||||||
|
</div>
|
||||||
|
<div id="movieBusiness" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<div id="movieDate" style="margin-bottom: 4px;">
|
||||||
|
<span class="textBold">Release Date:</span> ${release_date}
|
||||||
|
</div>
|
||||||
|
<span id="movieBudget">
|
||||||
|
<span class="textBold">Budget:</span> ${budget}
|
||||||
|
</span>
|
||||||
|
<span id="movieGross">
|
||||||
|
<span class="textBold">Gross:</span> ${gross}
|
||||||
|
</span>
|
||||||
|
<span id="movieLoss">
|
||||||
|
<span class="textBold">Profit:</span> ${profit}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id="moviePoll" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span id="movieRating">
|
||||||
|
<span class="textBold">Rating:</span> ${rating}
|
||||||
|
</span>
|
||||||
|
<span id="movieVotes">
|
||||||
|
<span class="textBold">Votes:</span> ${votes}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div id="movieConnections">
|
||||||
|
FIXME: movie connections
|
||||||
|
</div>
|
||||||
|
<div id="movieReviews" class="movieData textMedium textJustify" style="margin-bottom: 4px">
|
||||||
|
<span class="textBold">Reviews:</span> ${reviewsHtml}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
@ -59,6 +59,9 @@ var app = new Ox.App({
|
||||||
app.$ui.loadingIcon.stop();
|
app.$ui.loadingIcon.stop();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.template = {};
|
||||||
|
app.template.info = $('<div>').load('/static/html/itemInfo.html');
|
||||||
|
|
||||||
$.each(app.afterLaunch, function(i, f) {f()});
|
$.each(app.afterLaunch, function(i, f) {f()});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -567,6 +570,28 @@ app.constructItem = function(id, view) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else if(view == 'info') {
|
||||||
|
app.api.getItem(id, function(result) {
|
||||||
|
item_debug = result.data.item;
|
||||||
|
var item = result.data.item;
|
||||||
|
$item = new Ox.Container();
|
||||||
|
$item.append(app.template.info.tmpl(item));
|
||||||
|
app.$ui.contentPanel.replace(1, $item);
|
||||||
|
app.$ui.rightPanel
|
||||||
|
/*.unbindEvent('resize')*/
|
||||||
|
.bindEvent('resize', function(event, data) {
|
||||||
|
Ox.print('seems to work', data)
|
||||||
|
$item.options({
|
||||||
|
width: data - 256 - 1
|
||||||
|
});
|
||||||
|
});
|
||||||
|
app.$window.resize(function() {
|
||||||
|
$item.options({
|
||||||
|
width: app.$document.width() - app.$ui.leftPanel.width() - 1 - 256 - 1
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue