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

progress bars on resumable items

This commit is contained in:
Luke Pulverenti 2013-05-03 22:33:44 -04:00
parent 75ff5c8f43
commit fd54e02387
6 changed files with 117 additions and 25 deletions

View file

@ -113,11 +113,21 @@
width: 70%; width: 70%;
max-width: 1200px; max-width: 1200px;
} }
.ehsContent {
max-width: 1070px;
}
} }
@media all and (min-width: 1920px) { @media all and (min-width: 1920px) {
.ehsContent { .ehsContent {
max-width: 1000px; max-width: 1200px;
}
}
@media all and (min-width: 2300px) {
.ehsContent {
max-width: 1500px;
} }
} }
@ -230,6 +240,9 @@
border: 0; border: 0;
margin: 0; margin: 0;
height: 14px; height: 14px;
border: 1px solid #666;
border-radius: 0;
width: 100px;
} }
/* Polyfill */ /* Polyfill */
@ -281,7 +294,6 @@
position: relative; position: relative;
top: 3px; top: 3px;
margin-right: 1em; margin-right: 1em;
width: 50px;
} }
.tileItem .itemProgressBar { .tileItem .itemProgressBar {

View file

@ -9,6 +9,7 @@
text-decoration: none; text-decoration: none;
text-align: left; text-align: left;
overflow: hidden; overflow: hidden;
border: 1px solid #666;
} }
.posterItem:hover { .posterItem:hover {
@ -37,7 +38,7 @@
overflow: hidden; overflow: hidden;
text-wrap: none; text-wrap: none;
white-space: nowrap; white-space: nowrap;
padding: 4px; padding: 5px 4px 4px;
background: #181818; background: #181818;
text-shadow: none; text-shadow: none;
} }
@ -48,6 +49,7 @@
.posterItemText + .posterItemText { .posterItemText + .posterItemText {
padding-top: 2px; padding-top: 2px;
border-top: 0;
} }
.posterItemDefaultText { .posterItemDefaultText {
@ -84,13 +86,41 @@
.portraitPosterItem { .portraitPosterItem {
width: 100px; width: 100px;
border-color: #555;
} }
.portraitPosterItem .posterItemImage { .smallBackdropPosterItem {
border-color: #555;
}
.portraitPosterItem .posterItemImage {
height: 150px; height: 150px;
}
.posterItemProgress {
font-size: 12px;
color: #bbb;
vertical-align: middle;
}
.posterItemProgress .itemProgressBar {
height: 12px;
width: 35%;
} }
.portraitPosterItem .itemProgressText {
display: none;
}
.portraitPosterItem .itemProgressBar {
width: 100%;
}
.posterItem .itemProgressText {
margin-left: 5px;
vertical-align: middle;
}
@media all and (min-width: 650px) { @media all and (min-width: 650px) {
@ -124,6 +154,10 @@
height: 126px; height: 126px;
} }
.backdropPosterItem .itemProgressBar {
width: 55%;
}
.portraitPosterItem { .portraitPosterItem {
width: 108px; width: 108px;
} }
@ -144,33 +178,57 @@
} }
.portraitPosterItem { .portraitPosterItem {
width: 120px; width: 134px;
} }
.portraitPosterItem .posterItemImage { .portraitPosterItem .posterItemImage {
height: 180px; height: 201px;
}
.backdropPosterItem {
width: 256px;
}
.backdropPosterItem .posterItemImage {
height: 144px;
}
.portraitPosterItem .itemProgressText {
display: inline;
}
.portraitPosterItem .itemProgressBar {
width: 20%;
} }
} }
@media all and (min-width: 1920px) { @media all and (min-width: 1920px) {
.squarePosterItem { .squarePosterItem {
width: 185px; width: 200px;
} }
.squarePosterItem .posterItemImage { .squarePosterItem .posterItemImage {
height: 185px; height: 200px;
} }
.portraitPosterItem { .portraitPosterItem {
width: 136px; width: 160px;
} }
.portraitPosterItem .posterItemImage { .portraitPosterItem .posterItemImage {
height: 204px; height: 240px;
} }
.posterItem { .backdropPosterItem {
font-size: 16px; width: 288px;
}
.backdropPosterItem .posterItemImage {
height: 162px;
}
.portraitPosterItem .itemProgressBar {
width: 30%;
} }
} }

View file

@ -534,6 +534,13 @@
html += "</div>"; html += "</div>";
} }
if (options.showProgressBar) {
html += "<div class='posterItemText posterItemProgress'>";
html += LibraryBrowser.getItemProgressBarHtml(item, true) || "&nbsp;";
html += "</div>";
}
if (options.showNewIndicator !== false) { if (options.showNewIndicator !== false) {
html += LibraryBrowser.getNewIndicatorHtml(item); html += LibraryBrowser.getNewIndicatorHtml(item);
} }
@ -785,7 +792,7 @@
return html; return html;
}, },
getUserDataIconsHtml: function (item) { getItemProgressBarHtml: function (item, showProgressText) {
var html = ''; var html = '';
@ -809,7 +816,20 @@
html += '<progress title="' + tooltip + '" class="itemProgressBar" min="0" max="100" value="' + pct + '">'; html += '<progress title="' + tooltip + '" class="itemProgressBar" min="0" max="100" value="' + pct + '">';
html += '</progress>'; html += '</progress>';
if (showProgressText) {
html += '<span class="itemProgressText">' + tooltip + '</span>';
} }
}
return html;
},
getUserDataIconsHtml: function (item) {
var html = '';
html += LibraryBrowser.getItemProgressBarHtml(item);
var userData = item.UserData || {}; var userData = item.UserData || {};

View file

@ -11,7 +11,7 @@
IncludeItemTypes: "Movie", IncludeItemTypes: "Movie",
Limit: 7, Limit: 7,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio", Fields: "PrimaryImageAspectRatio,DateCreated,UserData",
Filters: "IsUnplayed" Filters: "IsUnplayed"
}; };
@ -34,7 +34,7 @@
Filters: "IsResumable", Filters: "IsResumable",
Limit: 7, Limit: 7,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio" Fields: "PrimaryImageAspectRatio,DateCreated,UserData"
}; };
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) { ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
@ -47,7 +47,8 @@
$('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({ $('#resumableItems', page).html(LibraryBrowser.getPosterViewHtml({
items: result.Items, items: result.Items,
useAverageAspectRatio: true useAverageAspectRatio: true,
showProgressBar: true
})); }));
}); });
@ -60,7 +61,7 @@
IncludeItemTypes: "Trailer", IncludeItemTypes: "Trailer",
Limit: 7, Limit: 7,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio,DateCreated", Fields: "PrimaryImageAspectRatio,DateCreated,UserData",
Filters: "IsUnplayed" Filters: "IsUnplayed"
}; };

View file

@ -37,7 +37,7 @@
var html = ''; var html = '';
var plugin = availablePlugins[i]; var plugin = availablePlugins[i];
html += "<a class='posterItem smallBackdropPosterItem transparentPosterItem' href='addPlugin.html?name=" + encodeURIComponent(plugin.name) + "'>"; html += "<a class='posterItem backdropPosterItem transparentPosterItem' href='addPlugin.html?name=" + encodeURIComponent(plugin.name) + "'>";
if (plugin.thumbImage) { if (plugin.thumbImage) {
html += '<div class="posterItemImage" style="background-image:url(\'' + plugin.thumbImage + '\');"></div>'; html += '<div class="posterItemImage" style="background-image:url(\'' + plugin.thumbImage + '\');"></div>';

View file

@ -9,9 +9,9 @@
SortBy: "DateCreated", SortBy: "DateCreated",
SortOrder: "Descending", SortOrder: "Descending",
IncludeItemTypes: "Episode", IncludeItemTypes: "Episode",
Limit: 6, Limit: 8,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio,SeriesInfo", Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
Filters: "IsUnplayed" Filters: "IsUnplayed"
}; };
@ -34,9 +34,9 @@
SortOrder: "Descending", SortOrder: "Descending",
IncludeItemTypes: "Episode", IncludeItemTypes: "Episode",
Filters: "IsResumable", Filters: "IsResumable",
Limit: 6, Limit: 8,
Recursive: true, Recursive: true,
Fields: "PrimaryImageAspectRatio,SeriesInfo,DateCreated" Fields: "PrimaryImageAspectRatio,SeriesInfo,UserData",
}; };
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) { ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
@ -52,7 +52,8 @@
useAverageAspectRatio: true, useAverageAspectRatio: true,
shape: "backdrop", shape: "backdrop",
showTitle: true, showTitle: true,
showParentTitle: true showParentTitle: true,
showProgressBar: true
})); }));
}); });