mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
This commit is contained in:
commit
d24f324427
6 changed files with 259 additions and 221 deletions
|
@ -87,9 +87,10 @@
|
||||||
|
|
||||||
.libraryItemsGrid th {
|
.libraryItemsGrid th {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
border-bottom: 1px solid #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryItemsGrid td, .libraryItemsGrid th {
|
.libraryItemsGrid td {
|
||||||
border-top: 1px solid #555;
|
border-top: 1px solid #555;
|
||||||
border-bottom: 1px solid #555;
|
border-bottom: 1px solid #555;
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
html += "<img style='background:" + LibraryBrowser.getMetroColor(item.Id) + ";' src='css/images/items/list/audio.png' />";
|
html += "<img style='background:" + LibraryBrowser.getMetroColor(item.Id) + ";' src='css/images/items/list/audio.png' />";
|
||||||
}
|
}
|
||||||
else if (item.MediaType == "Video") {
|
else if (item.MediaType == "Video" || item.Type == "Season" || item.Type == "Series") {
|
||||||
|
|
||||||
html += "<img style='background:" + LibraryBrowser.getMetroColor(item.Id) + ";' src='css/images/items/list/video.png' />";
|
html += "<img style='background:" + LibraryBrowser.getMetroColor(item.Id) + ";' src='css/images/items/list/video.png' />";
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@
|
||||||
html += item.Name;
|
html += item.Name;
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
html += "<div class='posterViewItemText'>";
|
html += "<div class='posterViewItemText'>";
|
||||||
html += item.ChildCount+" Movie";
|
html += item.ChildCount + " Movie";
|
||||||
if (item.ChildCount > 1) html += "s";
|
if (item.ChildCount > 1) html += "s";
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
}
|
}
|
||||||
|
@ -273,7 +273,7 @@
|
||||||
|
|
||||||
renderLinks: function (item) {
|
renderLinks: function (item) {
|
||||||
var page = $.mobile.activePage;
|
var page = $.mobile.activePage;
|
||||||
//console.log(item);
|
//console.log(item);
|
||||||
if (item.ProviderIds) {
|
if (item.ProviderIds) {
|
||||||
|
|
||||||
var html = 'Links: ';
|
var html = 'Links: ';
|
||||||
|
@ -311,5 +311,32 @@
|
||||||
} else {
|
} else {
|
||||||
$('#itemLinks', page).hide();
|
$('#itemLinks', page).hide();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getPagingHtml: function (query, totalRecordCount) {
|
||||||
|
|
||||||
|
var html = '';
|
||||||
|
|
||||||
|
var pageCount = Math.ceil(totalRecordCount / query.Limit);
|
||||||
|
var pageNumber = (query.StartIndex / query.Limit) + 1;
|
||||||
|
|
||||||
|
var dropdownHtml = '<select data-enhance="false" data-role="none">';
|
||||||
|
for (var i = 1; i <= pageCount; i++) {
|
||||||
|
|
||||||
|
if (i == pageNumber) {
|
||||||
|
dropdownHtml += '<option value="' + i + '" selected="selected">' + i + '</option>';
|
||||||
|
} else {
|
||||||
|
dropdownHtml += '<option value="' + i + '">' + i + '</option>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dropdownHtml += '</select>';
|
||||||
|
|
||||||
|
var recordsEnd = Math.min(query.StartIndex + query.Limit, totalRecordCount);
|
||||||
|
|
||||||
|
html += '<div class="listPaging">';
|
||||||
|
html += 'Results ' + (query.StartIndex + 1) + '-' + recordsEnd + ' of ' + totalRecordCount + ', page ' + dropdownHtml + ' of ' + pageCount;
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
|
return html;
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -1,4 +1,4 @@
|
||||||
var MediaPlayer = (function (document, clearTimeout, screen, localStorage, _V_, $) {
|
var MediaPlayer = (function (document, clearTimeout, screen, localStorage, _V_, $, setInterval) {
|
||||||
|
|
||||||
var testableAudioElement = document.createElement('audio');
|
var testableAudioElement = document.createElement('audio');
|
||||||
var testableVideoElement = document.createElement('video');
|
var testableVideoElement = document.createElement('video');
|
||||||
|
@ -360,4 +360,4 @@
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
||||||
})(document, clearTimeout, screen, localStorage, _V_, $);
|
})(document, clearTimeout, screen, localStorage, _V_, $, setInterval);
|
|
@ -138,31 +138,6 @@
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPagingHtml(result) {
|
|
||||||
|
|
||||||
var html = '';
|
|
||||||
|
|
||||||
var pageCount = Math.round(result.TotalRecordCount / query.Limit);
|
|
||||||
var pageNumber = (query.StartIndex / query.Limit) + 1;
|
|
||||||
|
|
||||||
var dropdownHtml = '<select data-enhance="false" data-role="none">';
|
|
||||||
for (var i = 1; i <= pageCount; i++) {
|
|
||||||
|
|
||||||
if (i == pageNumber) {
|
|
||||||
dropdownHtml += '<option value="' + i + '" selected="selected">' + i + '</option>';
|
|
||||||
} else {
|
|
||||||
dropdownHtml += '<option value="' + i + '">' + i + '</option>';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dropdownHtml += '</select>';
|
|
||||||
|
|
||||||
html += '<div class="listPaging">';
|
|
||||||
html += 'Results ' + (query.StartIndex + 1) + '-' + (query.StartIndex + query.Limit) + ' of ' + result.TotalRecordCount + ', page ' + dropdownHtml + ' of ' + pageCount;
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
return html;
|
|
||||||
}
|
|
||||||
|
|
||||||
function reloadItems(page) {
|
function reloadItems(page) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
@ -174,7 +149,7 @@
|
||||||
var showPaging = result.TotalRecordCount > query.Limit;
|
var showPaging = result.TotalRecordCount > query.Limit;
|
||||||
|
|
||||||
if (showPaging) {
|
if (showPaging) {
|
||||||
html += getPagingHtml(result);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (view == "Poster") {
|
if (view == "Poster") {
|
||||||
|
@ -188,7 +163,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showPaging) {
|
if (showPaging) {
|
||||||
html += getPagingHtml(result);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
var elem = $('#items', page);
|
var elem = $('#items', page);
|
||||||
|
|
|
@ -127,6 +127,22 @@
|
||||||
reloadItems(page);
|
reloadItems(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.chkStatus', this).on('change', function () {
|
||||||
|
|
||||||
|
var filterName = this.getAttribute('data-filter');
|
||||||
|
var filters = query.SeriesStatus || "";
|
||||||
|
|
||||||
|
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||||
|
|
||||||
|
if (this.checked) {
|
||||||
|
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||||
|
}
|
||||||
|
|
||||||
|
query.SeriesStatus = filters;
|
||||||
|
|
||||||
|
reloadItems(page);
|
||||||
|
});
|
||||||
|
|
||||||
}).on('pagebeforeshow', "#tvShowsPage", function () {
|
}).on('pagebeforeshow', "#tvShowsPage", function () {
|
||||||
|
|
||||||
reloadItems(this);
|
reloadItems(this);
|
||||||
|
@ -140,6 +156,15 @@
|
||||||
|
|
||||||
}).checkboxradio('refresh');
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
|
$('.chkStatus', this).each(function () {
|
||||||
|
|
||||||
|
var filters = "," + (query.SeriesStatus || "");
|
||||||
|
var filterName = this.getAttribute('data-filter');
|
||||||
|
|
||||||
|
this.checked = filters.indexOf(',' + filterName) != -1;
|
||||||
|
|
||||||
|
}).checkboxradio('refresh');
|
||||||
|
|
||||||
$('.radioSortOrder', this).each(function () {
|
$('.radioSortOrder', this).each(function () {
|
||||||
|
|
||||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||||
|
|
|
@ -74,6 +74,16 @@
|
||||||
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-theme="c" data-filter="Dislikes">
|
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-theme="c" data-filter="Dislikes">
|
||||||
<label for="chkDislikes">Dislikes</label>
|
<label for="chkDislikes">Dislikes</label>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
|
<fieldset data-role="controlgroup">
|
||||||
|
<legend>
|
||||||
|
<h3>Status:</h3>
|
||||||
|
</legend>
|
||||||
|
<input class="chkStatus" type="checkbox" name="chkStatusContinuing" id="chkStatusContinuing" data-theme="c" data-filter="Continuing">
|
||||||
|
<label for="chkStatusContinuing">Continuing</label>
|
||||||
|
<input class="chkStatus" type="checkbox" name="chkStatusEnded" id="chkStatusEnded" data-theme="c" data-filter="Ended">
|
||||||
|
<label for="chkStatusEnded">Ended</label>
|
||||||
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue