mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
continue with detail page consolidations
This commit is contained in:
parent
3ca4d1ea8c
commit
42acb4ae14
3 changed files with 57 additions and 110 deletions
|
@ -540,7 +540,7 @@
|
|||
|
||||
return html;
|
||||
},
|
||||
|
||||
|
||||
markPlayed: function (link) {
|
||||
|
||||
var id = link.getAttribute('data-itemid');
|
||||
|
@ -563,9 +563,9 @@
|
|||
markFavorite: function (link) {
|
||||
|
||||
var id = link.getAttribute('data-itemid');
|
||||
|
||||
|
||||
var $link = $(link);
|
||||
|
||||
|
||||
var markAsFavorite = $link.hasClass('imgFavoriteOff');
|
||||
|
||||
ApiClient.updateFavoriteStatus(Dashboard.getCurrentUserId(), id, markAsFavorite);
|
||||
|
@ -578,22 +578,22 @@
|
|||
$link.addClass('imgFavoriteOff').removeClass('imgFavorite');
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
markLike: function (link) {
|
||||
|
||||
|
||||
var id = link.getAttribute('data-itemid');
|
||||
|
||||
var $link = $(link);
|
||||
|
||||
if ($link.hasClass('imgLikeOff')) {
|
||||
|
||||
|
||||
ApiClient.updateUserItemRating(Dashboard.getCurrentUserId(), id, true);
|
||||
|
||||
link.src = "css/images/userdata/thumbs_up_on.png";
|
||||
$link.addClass('imgLike').removeClass('imgLikeOff');
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
ApiClient.clearUserItemRating(Dashboard.getCurrentUserId(), id);
|
||||
|
||||
link.src = "css/images/userdata/thumbs_up_off.png";
|
||||
|
@ -632,7 +632,7 @@
|
|||
},
|
||||
|
||||
getDetailImageHtml: function (item) {
|
||||
|
||||
|
||||
var imageTags = item.ImageTags || {};
|
||||
|
||||
var html = '';
|
||||
|
@ -748,6 +748,51 @@
|
|||
}
|
||||
|
||||
return miscInfo.join(' ');
|
||||
},
|
||||
|
||||
renderStudios: function (elem, item) {
|
||||
|
||||
if (item.Studios && item.Studios.length) {
|
||||
|
||||
var html = 'Studios: ';
|
||||
|
||||
for (var i = 0, length = item.Studios.length; i < length; i++) {
|
||||
|
||||
if (i > 0) {
|
||||
html += ' / ';
|
||||
}
|
||||
|
||||
html += '<a href="itembynamedetails.html?studio=' + item.Studios[i] + '">' + item.Studios[i] + '</a>';
|
||||
}
|
||||
|
||||
elem.show().html(html).trigger('create');
|
||||
|
||||
|
||||
} else {
|
||||
elem.hide();
|
||||
}
|
||||
},
|
||||
|
||||
renderGenres: function (elem, item) {
|
||||
|
||||
if (item.Genres && item.Genres.length) {
|
||||
var html = 'Genres: ';
|
||||
|
||||
for (var i = 0, length = item.Genres.length; i < length; i++) {
|
||||
|
||||
if (i > 0) {
|
||||
html += ' / ';
|
||||
}
|
||||
|
||||
html += '<a href="itembynamedetails.html?genre=' + item.Genres[i] + '">' + item.Genres[i] + '</a>';
|
||||
}
|
||||
|
||||
elem.show().html(html).trigger('create');
|
||||
|
||||
|
||||
} else {
|
||||
elem.hide();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue