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

use regular detail page for game systems

This commit is contained in:
Luke Pulverenti 2013-04-28 14:42:54 -04:00
parent 045ad64eb5
commit d95f783686
3 changed files with 3 additions and 101 deletions

View file

@ -1,53 +0,0 @@
(function ($, document, LibraryBrowser) {
function reload(page) {
var id = getParameterByName('id');
Dashboard.showLoadingMsg();
ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) {
var name = item.Name;
$('#itemImage', page).html(LibraryBrowser.getDetailImageHtml(item));
Dashboard.setPageTitle(name);
$('#itemName', page).html(name);
renderDetails(page, item);
Dashboard.hideLoadingMsg();
});
}
function renderDetails(page, item) {
LibraryBrowser.renderOverview($('#itemOverview', page), item);
if (item.CommunityRating) {
$('#itemCommunityRating', page).html(LibraryBrowser.getStarRatingHtml(item)).show().attr('title', item.CommunityRating);
} else {
$('#itemCommunityRating', page).hide();
}
$('#itemMiscInfo', page).html(LibraryBrowser.getMiscInfoHtml(item));
LibraryBrowser.renderGenres($('#itemGenres', page), item, "games");
LibraryBrowser.renderStudios($('#itemStudios', page), item, "games");
renderUserDataIcons(page, item);
LibraryBrowser.renderLinks($('#itemLinks', page), item);
}
function renderUserDataIcons(page, item) {
$('#itemRatings', page).html(LibraryBrowser.getUserDataIconsHtml(item));
}
$(document).on('pageshow', "#gamesystemPage", function () {
reload(this);
});
})(jQuery, document, LibraryBrowser);

View file

@ -305,6 +305,9 @@
if (item.Type == "MusicAlbum") {
return "itemdetails.html?id=" + id;
}
if (item.Type == "GamePlatform") {
return "itemdetails.html?id=" + id;
}
if (item.Type == "Genre") {
return "itembynamedetails.html?genre=" + encodeName(item.Name) + "&context=" + itemByNameContext;
}
@ -317,9 +320,6 @@
if (item.Type == "Artist") {
return "itembynamedetails.html?artist=" + encodeName(item.Name) + "&context=" + (itemByNameContext || "music");
}
if (item.Type == "GamePlatform") {
return "gamesystem.html?id=" + id;
}
return item.IsFolder ? (id ? "itemList.html?parentId=" + id : "#") : "itemdetails.html?id=" + id;