From 7dcf71e25613b724f72309fa1cc274e14720d625 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 17 Mar 2014 10:48:16 -0400 Subject: [PATCH] expand device identification --- dashboard-ui/collections.html | 4 +- dashboard-ui/css/librarybrowser.css | 4 + dashboard-ui/css/posteritem.css | 23 +- dashboard-ui/episodes.html | 4 +- dashboard-ui/gamegenres.html | 4 +- dashboard-ui/games.html | 4 +- dashboard-ui/gamestudios.html | 4 +- dashboard-ui/itemlist.html | 4 +- dashboard-ui/moviegenres.html | 4 +- dashboard-ui/moviepeople.html | 4 +- dashboard-ui/movies.html | 4 +- dashboard-ui/moviestudios.html | 4 +- dashboard-ui/movietrailers.html | 4 +- dashboard-ui/musicalbumartists.html | 4 +- dashboard-ui/musicalbums.html | 4 +- dashboard-ui/musicartists.html | 4 +- dashboard-ui/musicgenres.html | 4 +- dashboard-ui/musicvideos.html | 4 +- dashboard-ui/scripts/librarybrowser.js | 276 +--------------------- dashboard-ui/scripts/librarylist.js | 273 +++++++++++++++++++++ dashboard-ui/scripts/libraryreport.js | 20 +- dashboard-ui/scripts/mediaplayer-video.js | 14 +- dashboard-ui/scripts/moviepeople.js | 21 +- dashboard-ui/scripts/site.js | 2 +- dashboard-ui/scripts/tvpeople.js | 21 +- dashboard-ui/songs.html | 4 +- dashboard-ui/tvgenres.html | 4 +- dashboard-ui/tvpeople.html | 4 +- dashboard-ui/tvshows.html | 4 +- dashboard-ui/tvstudios.html | 4 +- 30 files changed, 344 insertions(+), 394 deletions(-) create mode 100644 dashboard-ui/scripts/librarylist.js diff --git a/dashboard-ui/collections.html b/dashboard-ui/collections.html index f4c99aaaca..2c0cc6e8ad 100644 --- a/dashboard-ui/collections.html +++ b/dashboard-ui/collections.html @@ -10,12 +10,12 @@
-
-
+
+
diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index bf78665b7e..b7e38de8ad 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -212,6 +212,10 @@ margin: .5em 0 .25em; } +.viewControls + .listTopPaging { + margin-left: .5em!important; +} + .labelPageSize { margin-left: 1em!important; display: inline !important; diff --git a/dashboard-ui/css/posteritem.css b/dashboard-ui/css/posteritem.css index 8f4d8e0a10..9b31979f6f 100644 --- a/dashboard-ui/css/posteritem.css +++ b/dashboard-ui/css/posteritem.css @@ -304,14 +304,6 @@ @media all and (min-width: 1440px) { - .squarePosterItem { - width: 180px; - } - - .squarePosterItem .posterItemImage { - height: 180px; - } - .backdropPosterItem { width: 298px; } @@ -320,17 +312,6 @@ height: 167.625px; } } - -@media all and (min-width: 1920px) { - - .squarePosterItem { - width: 190px; - } - - .squarePosterItem .posterItemImage { - height: 190px; - } -} /********************/ .ribbon-wrapper { width: 50px; @@ -341,6 +322,7 @@ left: 0px; z-index: 999; } + .ribbon { font: bold 11px Sans-Serif; color: #333; @@ -360,6 +342,7 @@ -moz-box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3); box-shadow: 0px 0px 3px rgba(0, 0, 0, 0.3); } + .ribbon-3d { background-color: #3344ff; background-image: -webkit-gradient(linear, left top, left bottom, from(#BFDC7A), to(#ff0033)); @@ -368,6 +351,7 @@ background-image: -ms-linear-gradient(top, #3344ff, #ff0033); background-image: -o-linear-gradient(top, #3344ff, #ff0033); } + .ribbon-blue { background-color: #1199ff; background-image: -webkit-gradient(linear, left top, left bottom, from(#1199ff), to(#3333ff)); @@ -376,6 +360,7 @@ background-image: -ms-linear-gradient(top, #1199ff, #3333ff); background-image: -o-linear-gradient(top, #1199ff, #3333ff); } + .ribbon-red { background-color: #ff3333; background-image: -webkit-gradient(linear, left top, left bottom, from(#ff3333), to(#992233)); diff --git a/dashboard-ui/episodes.html b/dashboard-ui/episodes.html index 4a83dd96ac..b0045117c8 100644 --- a/dashboard-ui/episodes.html +++ b/dashboard-ui/episodes.html @@ -21,12 +21,12 @@
-
-
+
+
diff --git a/dashboard-ui/gamegenres.html b/dashboard-ui/gamegenres.html index 81453abd1b..3371685cc3 100644 --- a/dashboard-ui/gamegenres.html +++ b/dashboard-ui/gamegenres.html @@ -14,11 +14,11 @@
-
-
+
+
diff --git a/dashboard-ui/games.html b/dashboard-ui/games.html index ae60fd3868..c41ae75bc2 100644 --- a/dashboard-ui/games.html +++ b/dashboard-ui/games.html @@ -16,12 +16,12 @@
-
-
+
+
diff --git a/dashboard-ui/gamestudios.html b/dashboard-ui/gamestudios.html index 51fe231e9e..89c7bef510 100644 --- a/dashboard-ui/gamestudios.html +++ b/dashboard-ui/gamestudios.html @@ -14,11 +14,11 @@
-
-
+
+
diff --git a/dashboard-ui/itemlist.html b/dashboard-ui/itemlist.html index ac31e62e5a..815b5c5990 100644 --- a/dashboard-ui/itemlist.html +++ b/dashboard-ui/itemlist.html @@ -23,12 +23,12 @@ -
-
+
+
diff --git a/dashboard-ui/moviegenres.html b/dashboard-ui/moviegenres.html index b36bcc0429..8117410759 100644 --- a/dashboard-ui/moviegenres.html +++ b/dashboard-ui/moviegenres.html @@ -18,11 +18,11 @@
-
-
+
+
diff --git a/dashboard-ui/moviepeople.html b/dashboard-ui/moviepeople.html index c1c1e14a9d..063c7bc48c 100644 --- a/dashboard-ui/moviepeople.html +++ b/dashboard-ui/moviepeople.html @@ -20,11 +20,11 @@
-
-
+
+
diff --git a/dashboard-ui/movies.html b/dashboard-ui/movies.html index 90fb8d9ca8..26f4e616e8 100644 --- a/dashboard-ui/movies.html +++ b/dashboard-ui/movies.html @@ -29,12 +29,12 @@ -
-
+
+
diff --git a/dashboard-ui/moviestudios.html b/dashboard-ui/moviestudios.html index ebc832066a..0015df0479 100644 --- a/dashboard-ui/moviestudios.html +++ b/dashboard-ui/moviestudios.html @@ -18,11 +18,11 @@
-
-
+
+
diff --git a/dashboard-ui/movietrailers.html b/dashboard-ui/movietrailers.html index 85820c4016..308248a9c8 100644 --- a/dashboard-ui/movietrailers.html +++ b/dashboard-ui/movietrailers.html @@ -20,12 +20,12 @@
-
-
+
+
diff --git a/dashboard-ui/musicalbumartists.html b/dashboard-ui/musicalbumartists.html index e9f8b26168..3bde053304 100644 --- a/dashboard-ui/musicalbumartists.html +++ b/dashboard-ui/musicalbumartists.html @@ -19,11 +19,11 @@
-
-
+
+
diff --git a/dashboard-ui/musicalbums.html b/dashboard-ui/musicalbums.html index fe1888364a..ff56ef41af 100644 --- a/dashboard-ui/musicalbums.html +++ b/dashboard-ui/musicalbums.html @@ -26,12 +26,12 @@ -
-
+
+
diff --git a/dashboard-ui/musicartists.html b/dashboard-ui/musicartists.html index 86acb81e09..9152311dcc 100644 --- a/dashboard-ui/musicartists.html +++ b/dashboard-ui/musicartists.html @@ -19,11 +19,11 @@
-
-
+
+
diff --git a/dashboard-ui/musicgenres.html b/dashboard-ui/musicgenres.html index 7a1f04dcba..e2b99c480d 100644 --- a/dashboard-ui/musicgenres.html +++ b/dashboard-ui/musicgenres.html @@ -16,11 +16,11 @@
-
-
+
+
diff --git a/dashboard-ui/musicvideos.html b/dashboard-ui/musicvideos.html index 9dfd9c4bad..f8fdf18556 100644 --- a/dashboard-ui/musicvideos.html +++ b/dashboard-ui/musicvideos.html @@ -20,12 +20,12 @@
-
-
+
+
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 534e208985..5a463d30ea 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -1936,278 +1936,4 @@ }; -})(window, document, jQuery, screen, localStorage); - -(function ($, document, window) { - - var showOverlayTimeout; - - function onHoverOut() { - - if (showOverlayTimeout) { - clearTimeout(showOverlayTimeout); - showOverlayTimeout = null; - } - - $('.posterItemOverlayTarget:visible', this).each(function () { - - var elem = this; - - $(this).animate({ "height": "0" }, "fast", function () { - - $(elem).hide(); - - }); - - }); - - $('.posterItemOverlayTarget:visible', this).stop().animate({ "height": "0" }, function () { - - $(this).hide(); - - }); - } - - function getOverlayHtml(item, currentUser, posterItem) { - - var html = ''; - - html += '
'; - - var isSmallItem = $(posterItem).hasClass('smallBackdropPosterItem'); - var isPortrait = $(posterItem).hasClass('portraitPosterItem'); - var isSquare = $(posterItem).hasClass('squarePosterItem'); - - var parentName = isSmallItem || isPortrait ? null : item.SeriesName; - var name = LibraryBrowser.getPosterViewDisplayName(item, true); - - html += '
'; - var logoHeight = isSmallItem ? 20 : 26; - var maxLogoWidth = isPortrait ? 100 : 200; - var imgUrl; - - if (parentName && item.ParentLogoItemId) { - - imgUrl = ApiClient.getImageUrl(item.ParentLogoItemId, { - height: logoHeight * 2, - type: 'logo', - tag: item.ParentLogoImageTag - }); - - html += ''; - - } - else if (item.ImageTags.Logo) { - - imgUrl = LibraryBrowser.getImageUrl(item, 'Logo', 0, { - height: logoHeight * 2, - }); - - html += ''; - } - else { - html += parentName || name; - } - html += '
'; - - if (parentName) { - html += '

'; - html += name; - html += '

'; - } else if (!isSmallItem) { - html += '

'; - html += LibraryBrowser.getMiscInfoHtml(item); - html += '

'; - } - - html += '
'; - html += ''; - html += LibraryBrowser.getRatingHtml(item, false); - html += ''; - - if (isPortrait) { - html += ''; - html += LibraryBrowser.getUserDataIconsHtml(item); - html += ''; - } else { - html += ''; - html += LibraryBrowser.getUserDataIconsHtml(item); - html += ''; - } - html += '
'; - - html += '
'; - - var buttonMargin = isPortrait || isSquare ? "margin:0 4px 0 0;" : "margin:0 10px 0 0;"; - - var buttonCount = 0; - - if (MediaPlayer.canPlay(item, currentUser)) { - - var resumePosition = (item.UserData || {}).PlaybackPositionTicks || 0; - var onPlayClick = 'LibraryBrowser.showPlayMenu(this, \'' + item.Id + '\', \'' + item.Type + '\', \'' + item.MediaType + '\', ' + resumePosition + ');return false;'; - - html += ''; - buttonCount++; - - if (item.MediaType == "Audio" || item.Type == "MusicAlbum") { - html += ''; - buttonCount++; - } - } - - if (item.LocalTrailerCount && item.PlayAccess == 'Full') { - html += ''; - buttonCount++; - } - - if (currentUser.Configuration.IsAdministrator && item.Type != "Recording" && item.Type != "Program") { - html += ''; - buttonCount++; - } - - if (!isPortrait || buttonCount < 3) { - html += ''; - } - - html += '
'; - - html += '
'; - - return html; - } - - function onTrailerButtonClick() { - - var id = this.getAttribute('data-itemid'); - - ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), id).done(function (trailers) { - MediaPlayer.play(trailers); - }); - - return false; - } - - function onRemoteControlButtonClick() { - - var id = this.getAttribute('data-itemid'); - - ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) { - - RemoteControl.showMenuForItem({ - item: item - }); - - }); - - return false; - } - - function onMenuCommand(command, elem) { - - var id = elem.getAttribute('data-itemid'); - } - - function getMenuOptions(elem) { - - var items = []; - - var id = elem.getAttribute('data-itemid'); - var mediatype = elem.getAttribute('data-mediatype'); - - items.push({ type: 'header', text: 'Edit' }); - - items.push({ type: 'link', text: 'Details', url: 'edititemmetadata.html?id=' + id }); - - items.push({ type: 'link', text: 'Images', url: 'edititemimages.html?id=' + id }); - - //if (mediatype == 'Video' && elem.getAttribute('data-locationtype') == 'FileSystem' && !elem.getAttribute('data-primaryversionid')) { - - // items.push({ type: 'divider' }); - // items.push({ type: 'header', text: 'Manage' }); - // items.push({ type: 'command', text: 'Alternate Versions', name: 'AlternateVersions' }); - //} - - return items; - } - - $.fn.createPosterItemMenus = function (options) { - - options = options || {}; - - function onShowTimerExpired(elem) { - - if ($(elem).hasClass('hasContextMenu')) { - return; - } - - var innerElem = $('.posterItemOverlayTarget', elem); - var id = elem.getAttribute('data-itemid'); - - var promise1 = ApiClient.getItem(Dashboard.getCurrentUserId(), id); - var promise2 = Dashboard.getCurrentUser(); - - $.when(promise1, promise2).done(function (response1, response2) { - - var item = response1[0]; - var user = response2[0]; - - innerElem.html(getOverlayHtml(item, user, elem)).trigger('create'); - - $('.btnPlayTrailer', innerElem).on('click', onTrailerButtonClick); - $('.btnRemoteControl', innerElem).on('click', onRemoteControlButtonClick); - }); - - innerElem.show().each(function () { - - this.style.height = 0; - - }).animate({ "height": "100%" }, "fast"); - } - - function onHoverIn() { - - if (showOverlayTimeout) { - clearTimeout(showOverlayTimeout); - showOverlayTimeout = null; - } - - var elem = this; - - showOverlayTimeout = setTimeout(function () { - - onShowTimerExpired(elem); - - }, 1000); - } - - // https://hacks.mozilla.org/2013/04/detecting-touch-its-the-why-not-the-how/ - - if (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)) { - /* browser with either Touch Events of Pointer Events - running on touch-capable device */ - return this; - } - - var sequence = this; - - if (options.contextMenu !== false) { - Dashboard.getCurrentUser().done(function (user) { - - if (user.Configuration.IsAdministrator) { - - sequence.createContextMenu({ - getOptions: getMenuOptions, - command: onMenuCommand, - selector: '.posterItem' - }); - } - - }); - } - - return this.on('mouseenter', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem,.squarePosterItem', onHoverIn) - .on('mouseleave', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem,.squarePosterItem', onHoverOut); - }; - -})(jQuery, document, window); \ No newline at end of file +})(window, document, jQuery, screen, localStorage); \ No newline at end of file diff --git a/dashboard-ui/scripts/librarylist.js b/dashboard-ui/scripts/librarylist.js new file mode 100644 index 0000000000..be58d3d42f --- /dev/null +++ b/dashboard-ui/scripts/librarylist.js @@ -0,0 +1,273 @@ +(function ($, document, window) { + + var showOverlayTimeout; + + function onHoverOut() { + + if (showOverlayTimeout) { + clearTimeout(showOverlayTimeout); + showOverlayTimeout = null; + } + + $('.posterItemOverlayTarget:visible', this).each(function () { + + var elem = this; + + $(this).animate({ "height": "0" }, "fast", function () { + + $(elem).hide(); + + }); + + }); + + $('.posterItemOverlayTarget:visible', this).stop().animate({ "height": "0" }, function () { + + $(this).hide(); + + }); + } + + function getOverlayHtml(item, currentUser, posterItem) { + + var html = ''; + + html += '
'; + + var isSmallItem = $(posterItem).hasClass('smallBackdropPosterItem'); + var isPortrait = $(posterItem).hasClass('portraitPosterItem'); + var isSquare = $(posterItem).hasClass('squarePosterItem'); + + var parentName = isSmallItem || isPortrait ? null : item.SeriesName; + var name = LibraryBrowser.getPosterViewDisplayName(item, true); + + html += '
'; + var logoHeight = isSmallItem ? 20 : 26; + var maxLogoWidth = isPortrait ? 100 : 200; + var imgUrl; + + if (parentName && item.ParentLogoItemId) { + + imgUrl = ApiClient.getImageUrl(item.ParentLogoItemId, { + height: logoHeight * 2, + type: 'logo', + tag: item.ParentLogoImageTag + }); + + html += ''; + + } + else if (item.ImageTags.Logo) { + + imgUrl = LibraryBrowser.getImageUrl(item, 'Logo', 0, { + height: logoHeight * 2, + }); + + html += ''; + } + else { + html += parentName || name; + } + html += '
'; + + if (parentName) { + html += '

'; + html += name; + html += '

'; + } else if (!isSmallItem) { + html += '

'; + html += LibraryBrowser.getMiscInfoHtml(item); + html += '

'; + } + + html += '
'; + html += ''; + html += LibraryBrowser.getRatingHtml(item, false); + html += ''; + + if (isPortrait) { + html += ''; + html += LibraryBrowser.getUserDataIconsHtml(item); + html += ''; + } else { + html += ''; + html += LibraryBrowser.getUserDataIconsHtml(item); + html += ''; + } + html += '
'; + + html += '
'; + + var buttonMargin = isPortrait || isSquare ? "margin:0 4px 0 0;" : "margin:0 10px 0 0;"; + + var buttonCount = 0; + + if (MediaPlayer.canPlay(item, currentUser)) { + + var resumePosition = (item.UserData || {}).PlaybackPositionTicks || 0; + var onPlayClick = 'LibraryBrowser.showPlayMenu(this, \'' + item.Id + '\', \'' + item.Type + '\', \'' + item.MediaType + '\', ' + resumePosition + ');return false;'; + + html += ''; + buttonCount++; + + if (item.MediaType == "Audio" || item.Type == "MusicAlbum") { + html += ''; + buttonCount++; + } + } + + if (item.LocalTrailerCount && item.PlayAccess == 'Full') { + html += ''; + buttonCount++; + } + + if (currentUser.Configuration.IsAdministrator && item.Type != "Recording" && item.Type != "Program") { + html += ''; + buttonCount++; + } + + if (!isPortrait || buttonCount < 3) { + html += ''; + } + + html += '
'; + + html += '
'; + + return html; + } + + function onTrailerButtonClick() { + + var id = this.getAttribute('data-itemid'); + + ApiClient.getLocalTrailers(Dashboard.getCurrentUserId(), id).done(function (trailers) { + MediaPlayer.play(trailers); + }); + + return false; + } + + function onRemoteControlButtonClick() { + + var id = this.getAttribute('data-itemid'); + + ApiClient.getItem(Dashboard.getCurrentUserId(), id).done(function (item) { + + RemoteControl.showMenuForItem({ + item: item + }); + + }); + + return false; + } + + function onMenuCommand(command, elem) { + + var id = elem.getAttribute('data-itemid'); + } + + function getMenuOptions(elem) { + + var items = []; + + var id = elem.getAttribute('data-itemid'); + var mediatype = elem.getAttribute('data-mediatype'); + + items.push({ type: 'header', text: 'Edit' }); + + items.push({ type: 'link', text: 'Details', url: 'edititemmetadata.html?id=' + id }); + + items.push({ type: 'link', text: 'Images', url: 'edititemimages.html?id=' + id }); + + //if (mediatype == 'Video' && elem.getAttribute('data-locationtype') == 'FileSystem' && !elem.getAttribute('data-primaryversionid')) { + + // items.push({ type: 'divider' }); + // items.push({ type: 'header', text: 'Manage' }); + // items.push({ type: 'command', text: 'Alternate Versions', name: 'AlternateVersions' }); + //} + + return items; + } + + $.fn.createPosterItemMenus = function (options) { + + options = options || {}; + + function onShowTimerExpired(elem) { + + if ($(elem).hasClass('hasContextMenu')) { + return; + } + + var innerElem = $('.posterItemOverlayTarget', elem); + var id = elem.getAttribute('data-itemid'); + + var promise1 = ApiClient.getItem(Dashboard.getCurrentUserId(), id); + var promise2 = Dashboard.getCurrentUser(); + + $.when(promise1, promise2).done(function (response1, response2) { + + var item = response1[0]; + var user = response2[0]; + + innerElem.html(getOverlayHtml(item, user, elem)).trigger('create'); + + $('.btnPlayTrailer', innerElem).on('click', onTrailerButtonClick); + $('.btnRemoteControl', innerElem).on('click', onRemoteControlButtonClick); + }); + + innerElem.show().each(function () { + + this.style.height = 0; + + }).animate({ "height": "100%" }, "fast"); + } + + function onHoverIn() { + + if (showOverlayTimeout) { + clearTimeout(showOverlayTimeout); + showOverlayTimeout = null; + } + + var elem = this; + + showOverlayTimeout = setTimeout(function () { + + onShowTimerExpired(elem); + + }, 1000); + } + + // https://hacks.mozilla.org/2013/04/detecting-touch-its-the-why-not-the-how/ + + if (('ontouchstart' in window) || (navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)) { + /* browser with either Touch Events of Pointer Events + running on touch-capable device */ + return this; + } + + var sequence = this; + + if (options.contextMenu !== false) { + Dashboard.getCurrentUser().done(function (user) { + + if (user.Configuration.IsAdministrator) { + + sequence.createContextMenu({ + getOptions: getMenuOptions, + command: onMenuCommand, + selector: '.posterItem' + }); + } + + }); + } + + return this.on('mouseenter', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem,.squarePosterItem', onHoverIn) + .on('mouseleave', '.backdropPosterItem,.smallBackdropPosterItem,.portraitPosterItem,.squarePosterItem', onHoverOut); + }; + +})(jQuery, document, window); \ No newline at end of file diff --git a/dashboard-ui/scripts/libraryreport.js b/dashboard-ui/scripts/libraryreport.js index afa0e67611..b170258a98 100644 --- a/dashboard-ui/scripts/libraryreport.js +++ b/dashboard-ui/scripts/libraryreport.js @@ -12,7 +12,8 @@ StartIndex: 0, IncludeItemTypes: "Movie", IsMissing: false, - IsVirtualUnaired: false + IsVirtualUnaired: false, + Limit: 300 }; function getHeaderCells(reportType) { @@ -529,11 +530,11 @@ // Scroll back up so they can see the results from the beginning $(document).scrollTop(0); - $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, false, [], false)).trigger('create'); updateFilterControls(page); - $('.listBottomPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount)).trigger('create'); + $('.listBottomPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, false, [], false)).trigger('create'); $('.reportContainer', page).html(getReportHtml(result.Items, reportType, query.SortBy, query.SortOrder)).trigger('create'); @@ -547,12 +548,6 @@ reloadItems(page); }); - $('.selectPageSize', page).on('change', function () { - query.Limit = parseInt(this.value); - query.StartIndex = 0; - reloadItems(page); - }); - $('.lnkColumnSort', page).on('click', function () { var order = this.getAttribute('data-sortfield'); @@ -841,13 +836,6 @@ }).on('pagebeforeshow', "#libraryReportPage", function () { var page = this; - var limit = LibraryBrowser.getDefaultPageSize(); - - // If the default page size has changed, the start index will have to be reset - if (limit != query.Limit) { - query.Limit = limit; - query.StartIndex = 0; - } query.SortBy = getDefaultSortOrder($('#selectView', page).val()); query.SortOrder = "Ascending"; diff --git a/dashboard-ui/scripts/mediaplayer-video.js b/dashboard-ui/scripts/mediaplayer-video.js index e5282eed1d..a95c2d2b96 100644 --- a/dashboard-ui/scripts/mediaplayer-video.js +++ b/dashboard-ui/scripts/mediaplayer-video.js @@ -24,7 +24,7 @@ self.initVideoPlayer = function () { video = playVideo(item, startPosition, user); enhancePlayer(); - return video + return video; }; self.toggleFullscreen = function () { @@ -50,7 +50,7 @@ videoBackdrop.remove(); }; - self.exitFullScreen = function () { + self.exitFullScreen = function() { if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozExitFullScreen) { @@ -62,11 +62,11 @@ $('#videoPlayer').removeClass('fullscreenVideo'); fullscreenExited = true; - } + }; - self.isFullScreen = function () { + self.isFullScreen = function() { return document.fullscreen || document.mozFullScreen || document.webkitIsFullScreen || document.msFullscreenElement ? true : false; - } + }; self.showSubtitleMenu = function () { @@ -349,7 +349,7 @@ function enterFullScreen() { - var player = $("#videoPlayer") + var player = $("#videoPlayer"); player.addClass("fullscreenVideo"); @@ -357,7 +357,7 @@ function exitFullScreenToWindow() { - var player = $("#videoPlayer") + var player = $("#videoPlayer"); player.removeClass("fullscreenVideo"); diff --git a/dashboard-ui/scripts/moviepeople.js b/dashboard-ui/scripts/moviepeople.js index 01e3df186c..d7c41d4a84 100644 --- a/dashboard-ui/scripts/moviepeople.js +++ b/dashboard-ui/scripts/moviepeople.js @@ -9,7 +9,8 @@ Recursive: true, Fields: "DateCreated", PersonTypes: "", - StartIndex: 0 + StartIndex: 0, + Limit: 100 }; function reloadItems(page) { @@ -23,7 +24,7 @@ var html = ''; - $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, false, [], false)).trigger('create'); updateFilterControls(page); @@ -37,7 +38,7 @@ coverImage: true }); - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); + html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, false, [], false); $('#items', page).html(html).trigger('create'); @@ -51,12 +52,6 @@ reloadItems(page); }); - $('.selectPageSize', page).on('change', function () { - query.Limit = parseInt(this.value); - query.StartIndex = 0; - reloadItems(page); - }); - LibraryBrowser.saveQueryValues('moviepeople', query); Dashboard.hideLoadingMsg(); @@ -131,14 +126,6 @@ }).on('pagebeforeshow', "#moviePeoplePage", function () { - var limit = LibraryBrowser.getDefaultPageSize(); - - // If the default page size has changed, the start index will have to be reset - if (limit != query.Limit) { - query.Limit = limit; - query.StartIndex = 0; - } - LibraryBrowser.loadSavedQueryValues('moviepeople', query); reloadItems(this); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index d0d81f627a..45e272cf3f 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -463,7 +463,7 @@ var Dashboard = { Dashboard.getCurrentUser().done(function (user) { - var html = '
'; + var html = '
'; html += '

'; diff --git a/dashboard-ui/scripts/tvpeople.js b/dashboard-ui/scripts/tvpeople.js index 4294dc143e..e38857d637 100644 --- a/dashboard-ui/scripts/tvpeople.js +++ b/dashboard-ui/scripts/tvpeople.js @@ -9,7 +9,8 @@ Recursive: true, Fields: "DateCreated", PersonTypes: "", - StartIndex: 0 + StartIndex: 0, + Limit: 100 }; function reloadItems(page) { @@ -23,7 +24,7 @@ var html = ''; - $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create'); + $('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, false, [], false)).trigger('create'); updateFilterControls(page); @@ -37,7 +38,7 @@ coverImage: true }); - html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount); + html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, false, [], false); $('#items', page).html(html).trigger('create'); @@ -51,12 +52,6 @@ reloadItems(page); }); - $('.selectPageSize', page).on('change', function () { - query.Limit = parseInt(this.value); - query.StartIndex = 0; - reloadItems(page); - }); - LibraryBrowser.saveQueryValues('tvpeople', query); Dashboard.hideLoadingMsg(); @@ -140,14 +135,6 @@ }).on('pagebeforeshow', "#tvPeoplePage", function () { - var limit = LibraryBrowser.getDefaultPageSize(); - - // If the default page size has changed, the start index will have to be reset - if (limit != query.Limit) { - query.Limit = limit; - query.StartIndex = 0; - } - LibraryBrowser.loadSavedQueryValues('tvpeople', query); reloadItems(this); diff --git a/dashboard-ui/songs.html b/dashboard-ui/songs.html index 03c2ada958..7a81b6ea99 100644 --- a/dashboard-ui/songs.html +++ b/dashboard-ui/songs.html @@ -16,12 +16,12 @@

-
-
+
+
diff --git a/dashboard-ui/tvgenres.html b/dashboard-ui/tvgenres.html index 4634a5a264..5d49788000 100644 --- a/dashboard-ui/tvgenres.html +++ b/dashboard-ui/tvgenres.html @@ -17,11 +17,11 @@
-
-
+
+
diff --git a/dashboard-ui/tvpeople.html b/dashboard-ui/tvpeople.html index e433fe9268..5b70ac2bb7 100644 --- a/dashboard-ui/tvpeople.html +++ b/dashboard-ui/tvpeople.html @@ -20,11 +20,11 @@
-
-
+
+
diff --git a/dashboard-ui/tvshows.html b/dashboard-ui/tvshows.html index 96496b7e55..9443ed8246 100644 --- a/dashboard-ui/tvshows.html +++ b/dashboard-ui/tvshows.html @@ -28,12 +28,12 @@
-
-
+
+
diff --git a/dashboard-ui/tvstudios.html b/dashboard-ui/tvstudios.html index a5b2e86436..8c0ceaed3c 100644 --- a/dashboard-ui/tvstudios.html +++ b/dashboard-ui/tvstudios.html @@ -17,11 +17,11 @@
-
-
+
+