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 08:42:22 -07:00
commit d24f324427
6 changed files with 259 additions and 221 deletions

View file

@ -87,9 +87,10 @@
.libraryItemsGrid th {
padding-bottom: 10px;
border-bottom: 1px solid #555;
}
.libraryItemsGrid td, .libraryItemsGrid th {
.libraryItemsGrid td {
border-top: 1px solid #555;
border-bottom: 1px solid #555;
}

View file

@ -52,7 +52,7 @@
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' />";
}
@ -311,5 +311,32 @@
} else {
$('#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;
}
};

View file

@ -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 testableVideoElement = document.createElement('video');
@ -360,4 +360,4 @@
return self;
})(document, clearTimeout, screen, localStorage, _V_, $);
})(document, clearTimeout, screen, localStorage, _V_, $, setInterval);

View file

@ -138,31 +138,6 @@
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) {
Dashboard.showLoadingMsg();
@ -174,7 +149,7 @@
var showPaging = result.TotalRecordCount > query.Limit;
if (showPaging) {
html += getPagingHtml(result);
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
if (view == "Poster") {
@ -188,7 +163,7 @@
}
if (showPaging) {
html += getPagingHtml(result);
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page);

View file

@ -127,6 +127,22 @@
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 () {
reloadItems(this);
@ -140,6 +156,15 @@
}).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 () {
this.checked = query.SortOrder == this.getAttribute('data-sortorder');

View file

@ -74,6 +74,16 @@
<input class="chkStandardFilter" type="checkbox" name="chkDislikes" id="chkDislikes" data-theme="c" data-filter="Dislikes">
<label for="chkDislikes">Dislikes</label>
</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>
</div>
</div>