mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
progress on channels api
This commit is contained in:
parent
fdda8549ba
commit
7a6bae9783
13 changed files with 152 additions and 41 deletions
|
@ -1,12 +1,4 @@
|
|||
.ui-icon-remote:after {
|
||||
background-image: url("images/icons/remote.png");
|
||||
}
|
||||
/* Fallback */
|
||||
.ui-nosvg .ui-icon-remote:after {
|
||||
background-image: url("images/icons/remote.png");
|
||||
}
|
||||
|
||||
.ui-icon-play:after {
|
||||
.ui-icon-play:after {
|
||||
background-image: url("images/icons/play.png");
|
||||
}
|
||||
/* Fallback */
|
||||
|
@ -93,13 +85,6 @@
|
|||
.ui-nosvg .ui-icon-subtitles:after {
|
||||
background-image: url("images/icons/subtitles.png");
|
||||
}
|
||||
.ui-icon-tv:after {
|
||||
background-image: url("images/icons/tv.png");
|
||||
}
|
||||
/* Fallback */
|
||||
.ui-nosvg .ui-icon-tv:after {
|
||||
background-image: url("images/icons/tv.png");
|
||||
}
|
||||
.ui-icon-wireless:after {
|
||||
background-image: url("images/icons/wireless.png");
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 402 B |
Binary file not shown.
Before Width: | Height: | Size: 346 B |
|
@ -1106,6 +1106,27 @@ a.itemTag:hover {
|
|||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.selectionCommands {
|
||||
margin: 1em 0;
|
||||
}
|
||||
|
||||
.itemSelectionPanel {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 55px;
|
||||
background-color: rgba(0, 0, 0, .85);
|
||||
z-index: 1000;
|
||||
text-align: center;
|
||||
padding: 1em;
|
||||
}
|
||||
|
||||
.selectionCommandsControlGroup {
|
||||
display: inline-block;
|
||||
margin-left: .5em;
|
||||
}
|
||||
|
||||
@media all and (min-height: 500px) {
|
||||
|
||||
.alphabetPicker {
|
||||
|
|
|
@ -304,6 +304,14 @@
|
|||
|
||||
@media all and (min-width: 1440px) {
|
||||
|
||||
.squarePosterItem {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
.squarePosterItem .posterItemImage {
|
||||
height: 180px;
|
||||
}
|
||||
|
||||
.backdropPosterItem {
|
||||
width: 298px;
|
||||
}
|
||||
|
|
|
@ -32,10 +32,17 @@
|
|||
<div class="viewControls" data-role="controlgroup" data-type="horizontal">
|
||||
<button data-mini="true" data-icon="sort" data-inline="true" data-iconpos="notext" title="Sort" onclick="$('#sortPanel', $(this).parents('.page')).panel( 'toggle' );">Sort</button>
|
||||
<button data-mini="true" data-icon="filter" data-inline="true" data-iconpos="notext" title="Filter" onclick="$('#filterPanel', $(this).parents('.page')).panel( 'toggle' );">Filter</button>
|
||||
<!-- <button data-mini="true" data-icon="check" data-inline="true" data-iconpos="notext" title="Select" class="btnToggleSelections">Select</button>-->
|
||||
</div>
|
||||
<div class="listTopPaging">
|
||||
</div>
|
||||
<div class="viewSummary"></div>
|
||||
|
||||
<div class="selectionCommands" style="display: none;">
|
||||
<div data-role="controlgroup" data-type="horizontal" class="selectionCommandsControlGroup">
|
||||
<button class="btnMergeVersions" data-mini="true" data-icon="recycle" data-inline="true" title="Combine Versions">Combine</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="items" class="itemsContainer"></div>
|
||||
</div>
|
||||
|
|
|
@ -269,7 +269,7 @@
|
|||
|
||||
updateTabs(page, item);
|
||||
|
||||
if (item.Type == "Person" || item.Type == "Studio" || item.Type == "MusicGenre" || item.Type == "Genre" || item.Type == "MusicArtist" || item.Type == "GameGenre" || item.Type == "Channel" || item.Type == "BoxSet") {
|
||||
if (item.Type == "Person" || item.Type == "Studio" || item.Type == "MusicGenre" || item.Type == "Genre" || item.Type == "MusicArtist" || item.Type == "GameGenre" || item.Type == "TvChannel" || item.Type == "BoxSet") {
|
||||
$('#btnEditPeople', page).hide();
|
||||
} else {
|
||||
$('#btnEditPeople', page).show();
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
|
||||
$('#refreshLoading', page).hide();
|
||||
|
||||
if (item.Type != "Channel" &&
|
||||
if (item.Type != "TvChannel" &&
|
||||
item.Type != "Genre" &&
|
||||
item.Type != "Studio" &&
|
||||
item.Type != "MusicGenre" &&
|
||||
|
@ -83,7 +83,7 @@
|
|||
setFieldVisibilities(page, item);
|
||||
fillItemInfo(page, item);
|
||||
|
||||
if (item.Type == "Person" || item.Type == "Studio" || item.Type == "MusicGenre" || item.Type == "Genre" || item.Type == "MusicArtist" || item.Type == "GameGenre" || item.Type == "Channel" || item.Type == "BoxSet") {
|
||||
if (item.Type == "Person" || item.Type == "Studio" || item.Type == "MusicGenre" || item.Type == "Genre" || item.Type == "MusicArtist" || item.Type == "GameGenre" || item.Type == "TvChannel" || item.Type == "BoxSet") {
|
||||
$('#btnEditPeople', page).hide();
|
||||
} else {
|
||||
$('#btnEditPeople', page).show();
|
||||
|
@ -218,7 +218,7 @@
|
|||
$('#fldAirTime', page).hide();
|
||||
}
|
||||
|
||||
if (item.MediaType == "Video" && item.Type != "Channel") {
|
||||
if (item.MediaType == "Video" && item.Type != "TvChannel") {
|
||||
$('#fld3dFormat', page).show();
|
||||
} else {
|
||||
$('#fld3dFormat', page).hide();
|
||||
|
@ -250,13 +250,13 @@
|
|||
$('#collapsibleSpecialEpisodeInfo', page).hide();
|
||||
}
|
||||
|
||||
if (item.Type == "Person" || item.Type == "Genre" || item.Type == "Studio" || item.Type == "GameGenre" || item.Type == "MusicGenre" || item.Type == "Channel") {
|
||||
if (item.Type == "Person" || item.Type == "Genre" || item.Type == "Studio" || item.Type == "GameGenre" || item.Type == "MusicGenre" || item.Type == "TvChannel") {
|
||||
$('#fldCommunityRating', page).hide();
|
||||
$('#fldCommunityVoteCount', page).hide();
|
||||
$('#genresCollapsible', page).hide();
|
||||
$('#studiosCollapsible', page).hide();
|
||||
|
||||
if (item.Type == "Channel") {
|
||||
if (item.Type == "TvChannel") {
|
||||
$('#fldOfficialRating', page).show();
|
||||
} else {
|
||||
$('#fldOfficialRating', page).hide();
|
||||
|
@ -271,7 +271,7 @@
|
|||
$('#fldCustomRating', page).show();
|
||||
}
|
||||
|
||||
if (item.Type == "Channel") {
|
||||
if (item.Type == "TvChannel") {
|
||||
$('#tagsCollapsible', page).hide();
|
||||
$('#metadataSettingsCollapsible', page).hide();
|
||||
$('#fldPremiereDate', page).hide();
|
||||
|
@ -309,7 +309,7 @@
|
|||
$('#keywordsCollapsible', page).hide();
|
||||
}
|
||||
|
||||
if (item.MediaType == "Video" && item.Type != "Channel") {
|
||||
if (item.MediaType == "Video" && item.Type != "TvChannel") {
|
||||
$('#fldSourceType', page).show();
|
||||
} else {
|
||||
$('#fldSourceType', page).hide();
|
||||
|
@ -327,7 +327,7 @@
|
|||
$('#fldPlaceOfBirth', page).hide();
|
||||
}
|
||||
|
||||
if (item.MediaType == "Video" && item.Type != "Channel") {
|
||||
if (item.MediaType == "Video" && item.Type != "TvChannel") {
|
||||
$('#fldOriginalAspectRatio', page).show();
|
||||
} else {
|
||||
$('#fldOriginalAspectRatio', page).hide();
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
}
|
||||
|
||||
if (!item.BackdropImageTags || !item.BackdropImageTags.length) {
|
||||
if (item.Type !== "Episode" && item.Type !== "Season" && item.MediaType !== "Audio" && item.Type !== "Channel" && item.Type !== "MusicAlbum") {
|
||||
if (item.Type !== "Episode" && item.Type !== "Season" && item.MediaType !== "Audio" && item.Type !== "TvChannel" && item.Type !== "MusicAlbum") {
|
||||
htmlName += '<img src="css/images/editor/missingbackdrop.png" title="Missing backdrop image." />';
|
||||
}
|
||||
}
|
||||
|
@ -381,7 +381,7 @@
|
|||
name = getParameterByName('channelid', url);
|
||||
|
||||
if (name) {
|
||||
self.currentItemType = "Channel";
|
||||
self.currentItemType = "TvChannel";
|
||||
self.currentItemId = name;
|
||||
return;
|
||||
}
|
||||
|
@ -400,7 +400,7 @@
|
|||
var currentItemName = self.currentItemName;
|
||||
var currentItemId = self.currentItemId;
|
||||
|
||||
if (currentItemType == "Channel") {
|
||||
if (currentItemType == "TvChannel") {
|
||||
return ApiClient.getLiveTvChannel(currentItemId);
|
||||
}
|
||||
|
||||
|
|
|
@ -365,7 +365,7 @@
|
|||
// Handle search hints
|
||||
var id = item.Id || item.ItemId;
|
||||
|
||||
if (item.Type == "Channel") {
|
||||
if (item.Type == "TvChannel") {
|
||||
return "livetvchannel.html?id=" + id;
|
||||
}
|
||||
if (item.Type == "Program") {
|
||||
|
@ -620,7 +620,7 @@
|
|||
background = defaultBackground;
|
||||
|
||||
}
|
||||
else if (item.Type == "Recording" || item.Type == "Program" || item.Type == "Channel") {
|
||||
else if (item.Type == "Recording" || item.Type == "Program" || item.Type == "TvChannel") {
|
||||
|
||||
if (item.Name && options.showTitle) {
|
||||
imgUrl = 'css/images/items/list/collection.png';
|
||||
|
@ -724,6 +724,14 @@
|
|||
html += '<div class="unidentifiedIndicator"><div class="ui-icon-alert ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
|
||||
if (options.selectionPanel) {
|
||||
var chkItemSelectId = 'chkItemSelect' + i;
|
||||
|
||||
// Render this pre-enhanced to save on jquery mobile dom manipulation
|
||||
html += '<div class="itemSelectionPanel" onclick="return false;"><div class="ui-checkbox ui-mini"><label class="ui-btn ui-corner-all ui-btn-inherit ui-btn-icon-left ui-checkbox-off" for="' + chkItemSelectId + '">Select</label><input data-mini="true" id="' + chkItemSelectId + '" type="checkbox" class="chkItemSelect" data-enhanced="true" /></div></div>';
|
||||
|
||||
}
|
||||
|
||||
if (!options.overlayText) {
|
||||
|
||||
if (progressHtml) {
|
||||
|
@ -898,7 +906,7 @@
|
|||
|
||||
var name = item.EpisodeTitle || item.Name;
|
||||
|
||||
if (item.Type == "Channel") {
|
||||
if (item.Type == "TvChannel") {
|
||||
return item.Number + ' ' + name;
|
||||
}
|
||||
if (displayAsSpecial && item.Type == "Episode" && item.ParentIndexNumber == 0) {
|
||||
|
@ -954,7 +962,7 @@
|
|||
|
||||
getPlayedIndicatorHtml: function (item) {
|
||||
|
||||
if (item.Type == "Channel") {
|
||||
if (item.Type == "TvChannel") {
|
||||
return '';
|
||||
}
|
||||
if (item.Type == "Series" || item.Type == "Season" || item.Type == "BoxSet" || item.MediaType == "Video" || item.MediaType == "Game" || item.MediaType == "Book") {
|
||||
|
@ -1294,7 +1302,7 @@
|
|||
var itemId = item.Id;
|
||||
var type = item.Type;
|
||||
|
||||
if ((item.MediaType || item.IsFolder) && item.Type != "Channel" && item.Type != "MusicArtist") {
|
||||
if ((item.MediaType || item.IsFolder) && item.Type != "TvChannel" && item.Type != "MusicArtist") {
|
||||
if (userData.Played) {
|
||||
html += '<img data-type="' + type + '" data-itemid="' + itemId + '" class="imgUserItemRating imgPlayed" src="css/images/userdata/checkedon.png" alt="Played" title="Played" onclick="LibraryBrowser.markPlayed(this);return false;" />';
|
||||
} else {
|
||||
|
@ -1485,7 +1493,7 @@
|
|||
else if (item.Type == "Genre" || item.Type == "Studio") {
|
||||
url = "css/images/items/detail/video.png";
|
||||
}
|
||||
else if (item.Type == "Channel") {
|
||||
else if (item.Type == "TvChannel") {
|
||||
url = "css/images/items/detail/tv.png";
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
var id = elem.getAttribute('data-itemid');
|
||||
}
|
||||
|
||||
function getMenuOptions(elem) {
|
||||
function getContextMenuOptions(elem) {
|
||||
|
||||
var items = [];
|
||||
|
||||
|
@ -201,6 +201,10 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if ($('.itemSelectionPanel', elem).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
var innerElem = $('.posterItemOverlayTarget', elem);
|
||||
var id = elem.getAttribute('data-itemid');
|
||||
|
||||
|
@ -257,7 +261,7 @@
|
|||
if (user.Configuration.IsAdministrator) {
|
||||
|
||||
sequence.createContextMenu({
|
||||
getOptions: getMenuOptions,
|
||||
getOptions: getContextMenuOptions,
|
||||
command: onMenuCommand,
|
||||
selector: '.posterItem'
|
||||
});
|
||||
|
@ -270,4 +274,79 @@
|
|||
.on('mouseleave', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem,.squarePosterItem', onHoverOut);
|
||||
};
|
||||
|
||||
function toggleSelections(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var selectionCommands = $('.selectionCommands', page);
|
||||
|
||||
if (selectionCommands.is(':visible')) {
|
||||
|
||||
selectionCommands.hide();
|
||||
$('.itemSelectionPanel', page).hide();
|
||||
|
||||
} else {
|
||||
|
||||
selectionCommands.show();
|
||||
|
||||
$('.itemSelectionPanel', page).show();
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function hideSelections(page) {
|
||||
|
||||
$('.selectionCommands', page).hide();
|
||||
|
||||
$('.itemSelectionPanel', page).hide();
|
||||
}
|
||||
|
||||
function getSelectedItems(page) {
|
||||
|
||||
var selection = $('.chkItemSelect:checked', page);
|
||||
|
||||
return selection.parents('.posterItem')
|
||||
.map(function() {
|
||||
|
||||
return this.getAttribute('data-itemid');
|
||||
|
||||
}).get();
|
||||
}
|
||||
|
||||
function combineVersions(page) {
|
||||
|
||||
var selection = getSelectedItems(page);
|
||||
|
||||
if (selection.length < 2) {
|
||||
|
||||
Dashboard.alert({
|
||||
message: "Please select two or more items to combine.",
|
||||
title: "Error"
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
hideSelections();
|
||||
}
|
||||
|
||||
$(document).on('pageinit', ".libraryPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.btnToggleSelections', page).on('click', function () {
|
||||
toggleSelections(page);
|
||||
});
|
||||
|
||||
$('.itemsContainer', page).on('listrender', function () {
|
||||
hideSelections(page);
|
||||
});
|
||||
|
||||
$('.btnMergeVersions', page).on('click', function () {
|
||||
combineVersions(page);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, document, window);
|
|
@ -442,7 +442,7 @@
|
|||
}
|
||||
|
||||
if (!item.BackdropImageTags || !item.BackdropImageTags.length) {
|
||||
if (item.Type !== "Episode" && item.Type !== "Season" && item.MediaType !== "Audio" && item.Type !== "Channel" && item.Type !== "MusicAlbum") {
|
||||
if (item.Type !== "Episode" && item.Type !== "Season" && item.MediaType !== "Audio" && item.Type !== "TvChannel" && item.Type !== "MusicAlbum") {
|
||||
html += '<a href="edititemimages.html?id=' + item.Id + '"><img src="css/images/editor/missingbackdrop.png" title="Missing backdrop image." /></a>';
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
preferThumb: true,
|
||||
context: 'movies'
|
||||
context: 'movies',
|
||||
selectionPanel: true
|
||||
});
|
||||
$('.itemsContainer', page).removeClass('timelineItemsContainer');
|
||||
}
|
||||
|
@ -48,7 +49,8 @@
|
|||
context: 'movies',
|
||||
useAverageAspectRatio: true,
|
||||
showTitle: true,
|
||||
centerText: true
|
||||
centerText: true,
|
||||
selectionPanel: true
|
||||
});
|
||||
$('.itemsContainer', page).removeClass('timelineItemsContainer');
|
||||
}
|
||||
|
@ -60,14 +62,15 @@
|
|||
useAverageAspectRatio: true,
|
||||
showTitle: true,
|
||||
timeline: true,
|
||||
centerText: true
|
||||
centerText: true,
|
||||
selectionPanel: true
|
||||
});
|
||||
$('.itemsContainer', page).addClass('timelineItemsContainer');
|
||||
}
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
||||
$('#items', page).html(html).trigger('create').createPosterItemMenus();
|
||||
$('#items', page).html(html).trigger('create').createPosterItemMenus().trigger('listrender');
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue