diff --git a/dashboard-ui/css/icons.css b/dashboard-ui/css/icons.css index 0654e3e5b7..7b439fa973 100644 --- a/dashboard-ui/css/icons.css +++ b/dashboard-ui/css/icons.css @@ -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"); } diff --git a/dashboard-ui/css/images/icons/remote.png b/dashboard-ui/css/images/icons/remote.png deleted file mode 100644 index 27bd8e2401..0000000000 Binary files a/dashboard-ui/css/images/icons/remote.png and /dev/null differ diff --git a/dashboard-ui/css/images/icons/tv.png b/dashboard-ui/css/images/icons/tv.png deleted file mode 100644 index e8fe67ac7e..0000000000 Binary files a/dashboard-ui/css/images/icons/tv.png and /dev/null differ diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index b7e38de8ad..ae48f93e03 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -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 { diff --git a/dashboard-ui/css/posteritem.css b/dashboard-ui/css/posteritem.css index 9b31979f6f..f84f4d50c7 100644 --- a/dashboard-ui/css/posteritem.css +++ b/dashboard-ui/css/posteritem.css @@ -304,6 +304,14 @@ @media all and (min-width: 1440px) { + .squarePosterItem { + width: 180px; + } + + .squarePosterItem .posterItemImage { + height: 180px; + } + .backdropPosterItem { width: 298px; } diff --git a/dashboard-ui/movies.html b/dashboard-ui/movies.html index 26f4e616e8..88eac124bd 100644 --- a/dashboard-ui/movies.html +++ b/dashboard-ui/movies.html @@ -32,10 +32,17 @@
+
+ +
diff --git a/dashboard-ui/scripts/edititemimages.js b/dashboard-ui/scripts/edititemimages.js index 04b00269ae..1ba1c1cb7e 100644 --- a/dashboard-ui/scripts/edititemimages.js +++ b/dashboard-ui/scripts/edititemimages.js @@ -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(); diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js index 1ead3f2293..579a740b22 100644 --- a/dashboard-ui/scripts/edititemmetadata.js +++ b/dashboard-ui/scripts/edititemmetadata.js @@ -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(); diff --git a/dashboard-ui/scripts/editorsidebar.js b/dashboard-ui/scripts/editorsidebar.js index e39b1f4a3b..be490d9406 100644 --- a/dashboard-ui/scripts/editorsidebar.js +++ b/dashboard-ui/scripts/editorsidebar.js @@ -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 += ''; } } @@ -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); } diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 5a463d30ea..4d64532b51 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -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 += '
'; } + if (options.selectionPanel) { + var chkItemSelectId = 'chkItemSelect' + i; + + // Render this pre-enhanced to save on jquery mobile dom manipulation + html += '
'; + + } + 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 += 'Played'; } 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 { diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js index be58d3d42f..005b285cc4 100644 --- a/dashboard-ui/scripts/librarylist.js +++ b/dashboard-ui/scripts/librarylist.js @@ -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); \ No newline at end of file diff --git a/dashboard-ui/scripts/libraryreport.js b/dashboard-ui/scripts/libraryreport.js index b170258a98..629f6115d1 100644 --- a/dashboard-ui/scripts/libraryreport.js +++ b/dashboard-ui/scripts/libraryreport.js @@ -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 += ''; } } diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index 24a5f882f2..2c635083c0 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -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;