mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added sorting for series recordings
This commit is contained in:
parent
eb07d62734
commit
c1a71bf416
6 changed files with 116 additions and 9 deletions
|
@ -52,7 +52,7 @@
|
||||||
<input type="checkbox" id="chkEnableCustomTranscodingTempPath" name="chkEnableCustomTranscodingTempPath" data-mini="true" />
|
<input type="checkbox" id="chkEnableCustomTranscodingTempPath" name="chkEnableCustomTranscodingTempPath" data-mini="true" />
|
||||||
<label for="chkEnableCustomTranscodingTempPath">Use custom transcoding temporary path</label>
|
<label for="chkEnableCustomTranscodingTempPath">Use custom transcoding temporary path</label>
|
||||||
<div class="fieldDescription">
|
<div class="fieldDescription">
|
||||||
This folder contains working files used by the media browser transcoder.
|
This folder contains working files used by the transcoder.
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li id="fldEnterTranscodingTempPath" style="display: none;">
|
<li id="fldEnterTranscodingTempPath" style="display: none;">
|
||||||
|
|
|
@ -15,9 +15,43 @@
|
||||||
</div>
|
</div>
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<div style="max-width: 600px; margin: 0 auto;">
|
<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 id="items"></div>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -195,7 +195,7 @@
|
||||||
$('#scenesCollapsible', page).show();
|
$('#scenesCollapsible', page).show();
|
||||||
renderScenes(page, item, 4);
|
renderScenes(page, item, 4);
|
||||||
}
|
}
|
||||||
if (item.LocalTrailerCount || !item.RemoteTrailers.length) {
|
if (item.LocalTrailerCount || !item.RemoteTrailers.length || item.Type == "Trailer") {
|
||||||
$('#trailersCollapsible', page).addClass('hide');
|
$('#trailersCollapsible', page).addClass('hide');
|
||||||
} else {
|
} else {
|
||||||
$('#trailersCollapsible', page).removeClass('hide');
|
$('#trailersCollapsible', page).removeClass('hide');
|
||||||
|
|
|
@ -56,7 +56,7 @@
|
||||||
html += '<div class="' + cssClass + '">';
|
html += '<div class="' + cssClass + '">';
|
||||||
|
|
||||||
var name = program.Name;
|
var name = program.Name;
|
||||||
|
|
||||||
if (program.IsRepeat) {
|
if (program.IsRepeat) {
|
||||||
name += " (R)";
|
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) {
|
renderMiscProgramInfo: function (elem, obj) {
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
$('.recordingItems', elem).html(LibraryBrowser.getPosterViewHtml({
|
$('.recordingItems', elem).html(LibraryBrowser.getPosterViewHtml({
|
||||||
|
|
||||||
items: recordings,
|
items: recordings,
|
||||||
shape: "backdrop",
|
shape: "square",
|
||||||
showTitle: true,
|
showTitle: true,
|
||||||
showParentTitle: true,
|
showParentTitle: true,
|
||||||
overlayText: true,
|
overlayText: true,
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
apiClient.getLiveTvRecordings({
|
apiClient.getLiveTvRecordings({
|
||||||
|
|
||||||
userId: Dashboard.getCurrentUserId(),
|
userId: Dashboard.getCurrentUserId(),
|
||||||
limit: 12,
|
limit: 15,
|
||||||
isRecording: false
|
isRecording: false
|
||||||
|
|
||||||
}).done(function (result) {
|
}).done(function (result) {
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
(function ($, document, apiClient) {
|
(function ($, document, apiClient) {
|
||||||
|
|
||||||
|
var query = {
|
||||||
|
|
||||||
|
SortBy: "SortName",
|
||||||
|
SortOrder: "Ascending"
|
||||||
|
};
|
||||||
|
|
||||||
function deleteSeriesTimer(page, id) {
|
function deleteSeriesTimer(page, id) {
|
||||||
|
|
||||||
Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Cancellation", function (result) {
|
Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Cancellation", function (result) {
|
||||||
|
@ -87,18 +93,54 @@
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
apiClient.getLiveTvSeriesTimers().done(function (result) {
|
apiClient.getLiveTvSeriesTimers(query).done(function (result) {
|
||||||
|
|
||||||
renderTimers(page, result.Items);
|
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 () {
|
$(document).on('pagebeforeshow', "#liveTvSeriesTimersPage", function () {
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
reload(page);
|
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);
|
})(jQuery, document, ApiClient);
|
Loading…
Add table
Add a link
Reference in a new issue