mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 19:08:18 -07:00
added sorting for series recordings
This commit is contained in:
parent
eb07d62734
commit
c1a71bf416
@ -52,7 +52,7 @@
|
||||
<input type="checkbox" id="chkEnableCustomTranscodingTempPath" name="chkEnableCustomTranscodingTempPath" data-mini="true" />
|
||||
<label for="chkEnableCustomTranscodingTempPath">Use custom transcoding temporary path</label>
|
||||
<div class="fieldDescription">
|
||||
This folder contains working files used by the media browser transcoder.
|
||||
This folder contains working files used by the transcoder.
|
||||
</div>
|
||||
</li>
|
||||
<li id="fldEnterTranscodingTempPath" style="display: none;">
|
||||
|
@ -15,9 +15,43 @@
|
||||
</div>
|
||||
<div data-role="content">
|
||||
<div style="max-width: 600px; margin: 0 auto;">
|
||||
|
||||
<div style="text-align: right;">
|
||||
<button data-mini="true" data-icon="sort" data-inline="true" onclick="$('#sortPanel', $(this).parents('.page')).panel( 'toggle' );">Sort</button>
|
||||
</div>
|
||||
|
||||
<div id="items"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div data-role="panel" id="sortPanel" data-position="right" data-display="overlay" data-theme="a" data-position-fixed="true">
|
||||
|
||||
<form>
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<strong>Sort By:</strong>
|
||||
</legend>
|
||||
|
||||
<input class="radioSortBy defaultSort" type="radio" name="radioSortBy" id="radioSortName" value="on" checked="checked" data-sortby="SortName" data-mini="true">
|
||||
<label for="radioSortName">Name</label>
|
||||
|
||||
<input class="radioSortBy" type="radio" name="radioSortBy" id="radioPriority" value="off" data-sortby="Priority" data-mini="true">
|
||||
<label for="radioPriority">Priority</label>
|
||||
</fieldset>
|
||||
|
||||
<fieldset data-role="controlgroup">
|
||||
<legend>
|
||||
<strong>Sort Order:</strong>
|
||||
</legend>
|
||||
|
||||
<input class="radioSortOrder" type="radio" name="radioSortOrder" id="radioAscending" value="on" checked="checked" data-sortorder="Ascending" data-mini="true">
|
||||
<label for="radioAscending">Ascending</label>
|
||||
|
||||
<input class="radioSortOrder" type="radio" name="radioSortOrder" id="radioDescending" value="off" data-sortorder="Descending" data-mini="true">
|
||||
<label for="radioDescending">Descending</label>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -195,7 +195,7 @@
|
||||
$('#scenesCollapsible', page).show();
|
||||
renderScenes(page, item, 4);
|
||||
}
|
||||
if (item.LocalTrailerCount || !item.RemoteTrailers.length) {
|
||||
if (item.LocalTrailerCount || !item.RemoteTrailers.length || item.Type == "Trailer") {
|
||||
$('#trailersCollapsible', page).addClass('hide');
|
||||
} else {
|
||||
$('#trailersCollapsible', page).removeClass('hide');
|
||||
|
@ -56,7 +56,7 @@
|
||||
html += '<div class="' + cssClass + '">';
|
||||
|
||||
var name = program.Name;
|
||||
|
||||
|
||||
if (program.IsRepeat) {
|
||||
name += " (R)";
|
||||
}
|
||||
@ -182,11 +182,42 @@
|
||||
}
|
||||
}
|
||||
|
||||
date = date.toLocaleTimeString();
|
||||
var lower = date.toLocaleTimeString().toLowerCase();
|
||||
|
||||
date = date.replace('0:00', '0').replace(':00 ', '').replace(' ', '');
|
||||
var hours = date.getHours();
|
||||
var minutes = date.getMinutes();
|
||||
|
||||
return date;
|
||||
var text;
|
||||
|
||||
if (lower.indexOf('am') != -1 || lower.indexOf('pm') != -1) {
|
||||
|
||||
var suffix = hours > 11 ? 'pm' : 'am';
|
||||
|
||||
hours = (hours % 12) || 12;
|
||||
|
||||
text = hours;
|
||||
|
||||
if (minutes) {
|
||||
|
||||
text += ':';
|
||||
if (minutes < 10) {
|
||||
text += '0';
|
||||
}
|
||||
text += minutes;
|
||||
}
|
||||
|
||||
text += suffix;
|
||||
|
||||
} else {
|
||||
text = hours + ':';
|
||||
|
||||
if (minutes < 10) {
|
||||
text += '0';
|
||||
}
|
||||
text += minutes;
|
||||
}
|
||||
|
||||
return text;
|
||||
},
|
||||
|
||||
renderMiscProgramInfo: function (elem, obj) {
|
||||
|
@ -52,7 +52,7 @@
|
||||
$('.recordingItems', elem).html(LibraryBrowser.getPosterViewHtml({
|
||||
|
||||
items: recordings,
|
||||
shape: "backdrop",
|
||||
shape: "square",
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
overlayText: true,
|
||||
@ -79,7 +79,7 @@
|
||||
apiClient.getLiveTvRecordings({
|
||||
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
limit: 12,
|
||||
limit: 15,
|
||||
isRecording: false
|
||||
|
||||
}).done(function (result) {
|
||||
|
@ -1,5 +1,11 @@
|
||||
(function ($, document, apiClient) {
|
||||
|
||||
var query = {
|
||||
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending"
|
||||
};
|
||||
|
||||
function deleteSeriesTimer(page, id) {
|
||||
|
||||
Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Cancellation", function (result) {
|
||||
@ -87,18 +93,54 @@
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
apiClient.getLiveTvSeriesTimers().done(function (result) {
|
||||
apiClient.getLiveTvSeriesTimers(query).done(function (result) {
|
||||
|
||||
renderTimers(page, result.Items);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pagebeforeshow', "#liveTvSeriesTimersPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
reload(page);
|
||||
|
||||
}).on('pageinit', "#liveTvSeriesTimersPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
reload(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
reload(page);
|
||||
});
|
||||
|
||||
}).on('pageshow', "#liveTvSeriesTimersPage", function () {
|
||||
|
||||
updateFilterControls(this);
|
||||
});
|
||||
|
||||
})(jQuery, document, ApiClient);
|
Loading…
Reference in New Issue
Block a user