1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
This commit is contained in:
Techywarrior 2013-04-09 22:00:23 -07:00
commit 867a549058
8 changed files with 56 additions and 13 deletions

View file

@ -175,3 +175,14 @@
.mediaInfoLabel {
color: #bbb;
}
.posterRibbon {
display: block;
position: absolute;
top: 0;
right: 0;
text-align: center;
background-color: #008FBB;
padding: 3px 10px;
border-bottom-left-radius: 10px;
}

View file

@ -407,7 +407,7 @@ form, .readOnlyContent {
display: inline-block;
margin: 5px;
text-align: center;
font-size: 15px;
font-size: 14px;
padding: 0;
position: relative;
padding-bottom: 28px;

View file

@ -7,7 +7,7 @@
SortOrder: "Ascending",
IncludeItemTypes: "BoxSet",
Recursive: true,
Fields: "PrimaryImageAspectRatio,ItemCounts"
Fields: "PrimaryImageAspectRatio,ItemCounts,ItemCounts,DateCreated"
};

View file

@ -78,6 +78,10 @@
html += "</div>";
}
if (options.showNewIndicator !== false) {
html += LibraryBrowser.getNewIndicatorHtml(item);
}
html += "</a></div>";
}
@ -153,6 +157,10 @@
html += "</div>";
}
if (options.showNewIndicator !== false) {
html += LibraryBrowser.getNewIndicatorHtml(item);
}
html += "</a></div>";
}
@ -220,12 +228,34 @@
html += "</div>";
}
if (options.showNewIndicator !== false) {
html += LibraryBrowser.getNewIndicatorHtml(item);
}
html += "</a></div>";
}
return html;
},
getNewIndicatorHtml: function (item) {
if (item.RecentlyAddedItemCount) {
return '<div class="posterRibbon">' + item.RecentlyAddedItemCount + ' New</div>';
}
if (!item.IsFolder) {
var date = item.DateCreated;
if (date && (new Date().getTime() - parseISO8601Date(date).getTime()) < 1209600000) {
return "<div class='posterRibbon'>New</div>";
}
}
return '';
},
getAveragePrimaryImageAspectRatio: function (items) {
var values = [];

View file

@ -9,7 +9,7 @@
SortOrder: "Ascending",
IncludeItemTypes: "Movie",
Recursive: true,
Fields: "PrimaryImageAspectRatio,UserData,DisplayMediaType",
Fields: "PrimaryImageAspectRatio,UserData,DisplayMediaType,ItemCounts,DateCreated",
Limit: LibraryBrowser.getDetaultPageSize(),
StartIndex: 0
};

View file

@ -19,7 +19,8 @@
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items,
useAverageAspectRatio: true
useAverageAspectRatio: true,
showNewIndicator: false
}));
});
@ -59,7 +60,7 @@
IncludeItemTypes: "Trailer",
Limit: 5,
Recursive: true,
Fields: "PrimaryImageAspectRatio",
Fields: "PrimaryImageAspectRatio,DateCreated",
Filters: "IsUnplayed"
};

View file

@ -19,7 +19,8 @@
$('#recentlyAddedItems', page).html(LibraryBrowser.getEpisodePosterViewHtml({
items: result.Items,
useAverageAspectRatio: true
useAverageAspectRatio: true,
showNewIndicator: false
}));
});
@ -33,7 +34,7 @@
Filters: "IsResumable",
Limit: 6,
Recursive: true,
Fields: "PrimaryImageAspectRatio,SeriesInfo"
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated"
};
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {

View file

@ -7,7 +7,7 @@
SortOrder: "Ascending",
IncludeItemTypes: "Series",
Recursive: true,
Fields: "PrimaryImageAspectRatio,SeriesInfo"
Fields: "PrimaryImageAspectRatio,SeriesInfo,ItemCounts,DateCreated"
};
function getTableHtml(items) {