From b1901ee91eeef51259721635acfe469a99a09b2f Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 17 Oct 2013 16:59:46 -0400 Subject: [PATCH] added detail page indicator for missing --- dashboard-ui/css/images/editor/missing.png | Bin 0 -> 1781 bytes dashboard-ui/itemdetails.html | 3 +++ dashboard-ui/scripts/Itemdetailpage.js | 24 ++++++++++++++++++++- dashboard-ui/scripts/boxsets.js | 8 +++---- dashboard-ui/scripts/edititemmetadata.js | 12 +++++++++++ dashboard-ui/scripts/episodes.js | 4 ++-- dashboard-ui/scripts/gamegenrepage.js | 8 +++---- dashboard-ui/scripts/gamespage.js | 8 +++---- dashboard-ui/scripts/gamestudiospage.js | 8 +++---- dashboard-ui/scripts/gamesystemspage.js | 8 +++---- dashboard-ui/scripts/itemlistpage.js | 4 ++-- dashboard-ui/scripts/librarybrowser.js | 6 ------ dashboard-ui/scripts/moviegenres.js | 8 +++---- dashboard-ui/scripts/moviepeople.js | 8 +++---- dashboard-ui/scripts/movies.js | 8 +++---- dashboard-ui/scripts/moviestudios.js | 8 +++---- dashboard-ui/scripts/movietrailers.js | 8 +++---- dashboard-ui/scripts/musicalbums.js | 8 +++---- dashboard-ui/scripts/musicartists.js | 8 +++---- dashboard-ui/scripts/musicgenres.js | 8 +++---- dashboard-ui/scripts/musicvideos.js | 8 +++---- dashboard-ui/scripts/songs.js | 6 +++--- dashboard-ui/scripts/tvgenres.js | 8 +++---- dashboard-ui/scripts/tvpeople.js | 8 +++---- dashboard-ui/scripts/tvshows.js | 18 ++++++++-------- dashboard-ui/scripts/tvstudios.js | 8 +++---- 26 files changed, 122 insertions(+), 91 deletions(-) create mode 100644 dashboard-ui/css/images/editor/missing.png diff --git a/dashboard-ui/css/images/editor/missing.png b/dashboard-ui/css/images/editor/missing.png new file mode 100644 index 0000000000000000000000000000000000000000..f4a7ff98a390d6edc803840b4cb6b33743cfee55 GIT binary patch literal 1781 zcmVPx#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D28u~UK~#8N?VV3( z990;==gqE=l1a$HLk>9zD%2vR+1ZT+1E~-(kO~&P1S~{Q@L*A~9z=?WdXQF2mop4{6Ws>FJ4#=beDX1!&*%(1;0xkSrv~E-ddr z>?W*Rt&EIZf9ck(N9;*0XeqFm%Pm26EyKz&9tsDgcYM=4HC-%j@rZV;7YgI1=Y0Wf zTS8$x91NxR;qO@xc^O1jYrzIh0`ER&$Z_cMn?>6` z%p;6?25#nZZxcek$QDvM&4t464%QAuve8cz8uscTPke0^NC}QhAdt;!z3u_Fvdo zwlWD6WMX3S1kjZs3!gPX-h86+kd!kqad`+K6Oe^-*o7Brk%UP}Vk+_)ESS)>CU_-z z5|)^ zkP@|#2T2FXca0r||IK91LLl(2Yie|ms8Qx&_q}**V}p%>1};G0G+U#Z0EwE(bA3!Y zpne`$aGVR2(hIz*md7OOB#-k})BQjJ-qME)DE|osyRmMJn$brQDw33Ik6o?#1Y!D<52^5GNNNg_;X)6#JWQm>R zAsq!GgD5eKJS3DrWRN6=m4}2Dhzx?nDDsd<0+D`}7*!q;Ss>Dn61$OybR`h!CyCw4 zL%J4-^n=7W@{m{pkzSSkSCBRQHsExk|&TPF}A>-lqZlNF_yrdmM4fQv1@^SAx{uPVpjtD zN}ixgiID~Nr943w5+e!hYk7i*5|bD0zaA5<3bUNO^(~659$KXnBGT z5(5Pu$on5{B(@ZIAg=`h68GIu-L&oZbdm@AqQ|UAwJ*M3TA!NA^9Z9!;6^?_2M=22 zRpmhUSaB`uIe7Qm9tl%}kf97AS8-M+9%%@?F*`eC`u-&}%|l8-dH4Yk&WuqR8Cldw z;zTu@t@qHnK+AQ{z{+(0^K}419Z2w~icP6ZkNJn0-)ugv+XVT%JHDiLj4j z{~S6rkIPKp@ZR1G260&>LGlDzWg?}oV8H}tC{1VPjy80XC(uPAA>=5QOdy;pG)<_L zHeuxnw2(+CJ6_ZdBD|u4sPY8LCGzQFL%xYy&C67fB~PG2B3!W*v19^$N`J*N4P?s`q%F~-l+AX+1e&I~hGo(uB~Or= zL`ruaj*j9izcqpRQt1IS?jkNHMbh#FDM|bUw!Qw)CEr6y?f6$jQU&vvPfH=AQ6esbv@I36{Wf-{Yeald#t8kFA2dR`&#IJbGE4!CN~ zMlN>->_(s67t)+h2Y;PMv|+taIGXXibI_(a9%>6D!7d2;x?))?@J6&eJ_HIx%9E2% z`PuAe@Ip&G6bNn%if>%YIv=z#T`1;q#|R;>!S5T(I6UzYyp#B=2iqPYt9!%4zvwP52uu{dxZ6osGluaW XRK?S%u;5$K00000NkvXXu0mjf(Z3(V literal 0 HcmV?d00001 diff --git a/dashboard-ui/itemdetails.html b/dashboard-ui/itemdetails.html index 2cc7a7b739..fe3e036ed0 100644 --- a/dashboard-ui/itemdetails.html +++ b/dashboard-ui/itemdetails.html @@ -127,6 +127,9 @@ Next →
+ diff --git a/dashboard-ui/scripts/Itemdetailpage.js b/dashboard-ui/scripts/Itemdetailpage.js index 6ddb8167e2..3cb4a605a9 100644 --- a/dashboard-ui/scripts/Itemdetailpage.js +++ b/dashboard-ui/scripts/Itemdetailpage.js @@ -25,11 +25,33 @@ LibraryBrowser.renderDetailPageBackdrop(page, item); if (item.LocationType == "Offline") { + $('#offlineIndicator', page).show(); - } else { + } + else { $('#offlineIndicator', page).hide(); } + var isMissingEpisode = false; + + if (item.LocationType == "Virtual" && item.Type == "Episode") { + try { + if (item.PremiereDate && (new Date().getTime() >= parseISO8601Date(item.PremiereDate).getTime())) { + isMissingEpisode = true; + } + } catch (err) { + + } + } + + if (isMissingEpisode) { + + $('#missingIndicator', page).show(); + } + else { + $('#missingIndicator', page).hide(); + } + if (MediaPlayer.canPlay(item) && item.LocationType !== "Offline" && item.LocationType !== "Virtual") { $('#playButtonContainer', page).show(); } else { diff --git a/dashboard-ui/scripts/boxsets.js b/dashboard-ui/scripts/boxsets.js index 244d367de5..caedcf102f 100644 --- a/dashboard-ui/scripts/boxsets.js +++ b/dashboard-ui/scripts/boxsets.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('boxsets', query); function reloadItems(page) { @@ -148,6 +146,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('boxsets', query); + reloadItems(this); }).on('pageshow', "#boxsetsPage", function () { @@ -155,13 +155,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/edititemmetadata.js b/dashboard-ui/scripts/edititemmetadata.js index 38edf7b369..81a991e616 100644 --- a/dashboard-ui/scripts/edititemmetadata.js +++ b/dashboard-ui/scripts/edititemmetadata.js @@ -44,6 +44,18 @@ } } + if (item.Type == "Episode" && item.LocationType == "Virtual") { + + try { + if (item.PremiereDate && (new Date().getTime() >= parseISO8601Date(item.PremiereDate).getTime())) { + htmlName += ''; + } + } catch (err) { + + } + + } + htmlName += "
"; var rel = item.IsFolder ? 'folder' : 'default'; diff --git a/dashboard-ui/scripts/episodes.js b/dashboard-ui/scripts/episodes.js index 46a2a1b896..619ba81175 100644 --- a/dashboard-ui/scripts/episodes.js +++ b/dashboard-ui/scripts/episodes.js @@ -255,13 +255,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = (query.SortBy || '').toLowerCase() == (this.getAttribute('data-sortby') || '').toLowerCase(); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = (query.SortOrder || '').toLowerCase() == (this.getAttribute('data-sortorder') || '').toLowerCase(); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/gamegenrepage.js b/dashboard-ui/scripts/gamegenrepage.js index aa032c9dab..7f92d489c5 100644 --- a/dashboard-ui/scripts/gamegenrepage.js +++ b/dashboard-ui/scripts/gamegenrepage.js @@ -9,8 +9,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('gamegenres', query); function reloadItems(page) { @@ -111,6 +109,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('gamegenres', query); + reloadItems(this); }).on('pageshow', "#gameGenresPage", function () { @@ -118,13 +118,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); }); diff --git a/dashboard-ui/scripts/gamespage.js b/dashboard-ui/scripts/gamespage.js index bacfa7b569..1991714194 100644 --- a/dashboard-ui/scripts/gamespage.js +++ b/dashboard-ui/scripts/gamespage.js @@ -13,8 +13,6 @@ Fields: "Genres,Studios,PrimaryImageAspectRatio", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('games', query); function reloadItems(page) { @@ -201,6 +199,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('games', query); + reloadItems(this); }).on('pageshow', "#gamesPage", function () { @@ -209,13 +209,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/gamestudiospage.js b/dashboard-ui/scripts/gamestudiospage.js index ce2a5c9c23..0beeba2d1f 100644 --- a/dashboard-ui/scripts/gamestudiospage.js +++ b/dashboard-ui/scripts/gamestudiospage.js @@ -10,8 +10,6 @@ Fields: "UserData", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('gamestudios', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('gamestudios', query); + reloadItems(this); }).on('pageshow', "#gameStudiosPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/gamesystemspage.js b/dashboard-ui/scripts/gamesystemspage.js index 5b964543a6..c3ada8a30e 100644 --- a/dashboard-ui/scripts/gamesystemspage.js +++ b/dashboard-ui/scripts/gamesystemspage.js @@ -11,8 +11,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('gamesystems', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('gamesystems', query); + reloadItems(this); }).on('pageshow', "#gamesystemsPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/itemlistpage.js b/dashboard-ui/scripts/itemlistpage.js index aa519506b9..7c800ccaa8 100644 --- a/dashboard-ui/scripts/itemlistpage.js +++ b/dashboard-ui/scripts/itemlistpage.js @@ -189,13 +189,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index a62fec4fe3..fcdab652a7 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -861,12 +861,6 @@ return ''; } - if (item.Type == "Season") { - if (item.RecursiveUnplayedItemCount) { - return '
' + item.RecursiveUnplayedItemCount + ' New
'; - } - } - if (item.Type == "Series") { if (item.RecursiveUnplayedItemCount && item.PlayedPercentage) { return '
' + item.RecursiveUnplayedItemCount + ' New
'; diff --git a/dashboard-ui/scripts/moviegenres.js b/dashboard-ui/scripts/moviegenres.js index 640ad4c40e..bc2fe973c5 100644 --- a/dashboard-ui/scripts/moviegenres.js +++ b/dashboard-ui/scripts/moviegenres.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('moviegenres', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('moviegenres', query); + reloadItems(this); }).on('pageshow', "#movieGenresPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); }); diff --git a/dashboard-ui/scripts/moviepeople.js b/dashboard-ui/scripts/moviepeople.js index 0bf39b83b4..16396ddd7d 100644 --- a/dashboard-ui/scripts/moviepeople.js +++ b/dashboard-ui/scripts/moviepeople.js @@ -11,8 +11,6 @@ PersonTypes: "", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('moviepeople', query); function reloadItems(page) { @@ -144,6 +142,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('moviepeople', query); + reloadItems(this); }).on('pageshow', "#moviePeoplePage", function () { @@ -151,13 +151,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/movies.js b/dashboard-ui/scripts/movies.js index 53ebcaaa28..175233db66 100644 --- a/dashboard-ui/scripts/movies.js +++ b/dashboard-ui/scripts/movies.js @@ -13,8 +13,6 @@ StartIndex: 0 }; - LibraryBrowser.loadSavedQueryValues('movies', query); - function reloadItems(page) { Dashboard.showLoadingMsg(); @@ -232,6 +230,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('movies', query); + reloadItems(this); }).on('pageshow', "#moviesPage", function () { @@ -239,13 +239,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/moviestudios.js b/dashboard-ui/scripts/moviestudios.js index 8ecef03130..fc85e18539 100644 --- a/dashboard-ui/scripts/moviestudios.js +++ b/dashboard-ui/scripts/moviestudios.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('moviestudios', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('moviestudios', query); + reloadItems(this); }).on('pageshow', "#movieStudiosPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/movietrailers.js b/dashboard-ui/scripts/movietrailers.js index 9a0570ad5b..0ce488c40a 100644 --- a/dashboard-ui/scripts/movietrailers.js +++ b/dashboard-ui/scripts/movietrailers.js @@ -12,8 +12,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('movietrailers', query); function reloadItems(page) { @@ -144,6 +142,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('movietrailers', query); + reloadItems(this); }).on('pageshow', "#movieTrailersPage", function () { @@ -152,13 +152,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/musicalbums.js b/dashboard-ui/scripts/musicalbums.js index 3221476295..31bbf3dbea 100644 --- a/dashboard-ui/scripts/musicalbums.js +++ b/dashboard-ui/scripts/musicalbums.js @@ -12,8 +12,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('musicalbums', query); function reloadItems(page) { @@ -176,6 +174,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('musicalbums', query); + reloadItems(this); }).on('pageshow', "#musicAlbumsPage", function () { @@ -185,13 +185,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/musicartists.js b/dashboard-ui/scripts/musicartists.js index 85ec1af94b..ee80c9b531 100644 --- a/dashboard-ui/scripts/musicartists.js +++ b/dashboard-ui/scripts/musicartists.js @@ -9,8 +9,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('musicartists', query); function reloadItems(page) { @@ -127,6 +125,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('musicartists', query); + reloadItems(this); }).on('pageshow', "#musicArtistsPage", function () { @@ -134,13 +134,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/musicgenres.js b/dashboard-ui/scripts/musicgenres.js index 2cef3cb51a..3985244dfd 100644 --- a/dashboard-ui/scripts/musicgenres.js +++ b/dashboard-ui/scripts/musicgenres.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('musicgenres', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('musicgenres', query); + reloadItems(this); }).on('pageshow', "#musicGenresPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); }); diff --git a/dashboard-ui/scripts/musicvideos.js b/dashboard-ui/scripts/musicvideos.js index 83478ead2e..cfe24bd664 100644 --- a/dashboard-ui/scripts/musicvideos.js +++ b/dashboard-ui/scripts/musicvideos.js @@ -12,8 +12,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('musicvideos', query); function reloadItems(page) { @@ -224,6 +222,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('musicvideos', query); + reloadItems(this); }).on('pageshow', "#musicVideosPage", function () { @@ -231,13 +231,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/songs.js b/dashboard-ui/scripts/songs.js index 5506ca7a16..b363d5e10f 100644 --- a/dashboard-ui/scripts/songs.js +++ b/dashboard-ui/scripts/songs.js @@ -21,13 +21,13 @@ // Reset form values using the last used query $('.radioSortBy', page).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); - $('.radioSortOrder', page).each(function () { + $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); } diff --git a/dashboard-ui/scripts/tvgenres.js b/dashboard-ui/scripts/tvgenres.js index 0af8b451b8..39f94e9c05 100644 --- a/dashboard-ui/scripts/tvgenres.js +++ b/dashboard-ui/scripts/tvgenres.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('tvgenres', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('tvgenres', query); + reloadItems(this); }).on('pageshow', "#tvGenresPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/tvpeople.js b/dashboard-ui/scripts/tvpeople.js index 31d7f7a00e..72b0235226 100644 --- a/dashboard-ui/scripts/tvpeople.js +++ b/dashboard-ui/scripts/tvpeople.js @@ -11,8 +11,6 @@ PersonTypes: "", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('tvpeople', query); function reloadItems(page) { @@ -144,6 +142,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('tvpeople', query); + reloadItems(this); }).on('pageshow', "#tvPeoplePage", function () { @@ -151,13 +151,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); diff --git a/dashboard-ui/scripts/tvshows.js b/dashboard-ui/scripts/tvshows.js index 467b2059c7..ac43039f60 100644 --- a/dashboard-ui/scripts/tvshows.js +++ b/dashboard-ui/scripts/tvshows.js @@ -12,8 +12,6 @@ Fields: "SeriesInfo,DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('tvshows', query); function reloadItems(page) { @@ -225,6 +223,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('tvshows', query); + reloadItems(this); }).on('pageshow', "#tvShowsPage", function () { @@ -232,7 +232,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); + + }).checkboxradio('refresh'); + + $('.radioSortOrder', this).each(function () { + + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh'); @@ -245,12 +251,6 @@ }).checkboxradio('refresh'); - $('.radioSortOrder', this).each(function () { - - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); - - }).checkboxradio('refresh'); - $('.chkStandardFilter', this).each(function () { var filters = "," + (query.Filters || ""); diff --git a/dashboard-ui/scripts/tvstudios.js b/dashboard-ui/scripts/tvstudios.js index ed516eb9d5..bb5f9e5806 100644 --- a/dashboard-ui/scripts/tvstudios.js +++ b/dashboard-ui/scripts/tvstudios.js @@ -10,8 +10,6 @@ Fields: "DateCreated", StartIndex: 0 }; - - LibraryBrowser.loadSavedQueryValues('tvstudios', query); function reloadItems(page) { @@ -112,6 +110,8 @@ query.StartIndex = 0; } + LibraryBrowser.loadSavedQueryValues('tvstudios', query); + reloadItems(this); }).on('pageshow', "#tvStudiosPage", function () { @@ -119,13 +119,13 @@ // Reset form values using the last used query $('.radioSortBy', this).each(function () { - this.checked = query.SortBy == this.getAttribute('data-sortby'); + this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase(); }).checkboxradio('refresh'); $('.radioSortOrder', this).each(function () { - this.checked = query.SortOrder == this.getAttribute('data-sortorder'); + this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase(); }).checkboxradio('refresh');