1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

display rt summary

This commit is contained in:
Luke Pulverenti 2013-05-06 00:50:40 -04:00
parent 4c30399fde
commit 70e4ec0669
5 changed files with 48 additions and 16 deletions

View file

@ -813,18 +813,21 @@
getRatingHtml: function (item) {
var rating = item.CommunityRating / 2;
var html = "";
for (var i = 1; i <= 5; i++) {
if (rating < i - 1) {
html += "<div class='starRating emptyStarRating' title='" + item.CommunityRating + "'></div>";
}
else if (rating < i) {
html += "<div class='starRating halfStarRating' title='" + item.CommunityRating + "'></div>";
}
else {
html += "<div class='starRating' title='" + item.CommunityRating + "'></div>";
if (item.CommunityRating) {
var rating = item.CommunityRating / 2;
for (var i = 1; i <= 5; i++) {
if (rating < i - 1) {
html += "<div class='starRating emptyStarRating' title='" + item.CommunityRating + "'></div>";
}
else if (rating < i) {
html += "<div class='starRating halfStarRating' title='" + item.CommunityRating + "'></div>";
}
else {
html += "<div class='starRating' title='" + item.CommunityRating + "'></div>";
}
}
}
@ -837,7 +840,6 @@
}
html += '<div class="criticRating">' + item.CriticRating + '%</div>';
}
return html;