diff --git a/dashboard-ui/channels.html b/dashboard-ui/channels.html index 58304b35b6..2eb48e62ff 100644 --- a/dashboard-ui/channels.html +++ b/dashboard-ui/channels.html @@ -16,7 +16,7 @@ ${TabChannels} -
+
diff --git a/dashboard-ui/css/librarybrowser.css b/dashboard-ui/css/librarybrowser.css index da225e3556..30dcb0b50f 100644 --- a/dashboard-ui/css/librarybrowser.css +++ b/dashboard-ui/css/librarybrowser.css @@ -92,7 +92,7 @@ margin-left: 2em; } -.ehsContent { +.ehsContent, .ehsContent .pageTabContent { margin: 0 auto; } @@ -131,8 +131,9 @@ @media all and (min-width: 500px) { - .ehsContent { + .ehsContent:not(.fullWidth), .ehsContent .pageTabContent { width: 98%; + margin: 0 auto; } } @@ -145,14 +146,14 @@ @media all and (min-width: 1200px) { - .ehsContent { + .ehsContent:not(.fullWidth), .ehsContent .pageTabContent { width: 97%; } } @media all and (min-width: 1920px) { - .ehsContent { + .ehsContent:not(.fullWidth), .ehsContent .pageTabContent { width: 96%; } } diff --git a/dashboard-ui/index.html b/dashboard-ui/index.html index a7240ce768..350f6bf85a 100644 --- a/dashboard-ui/index.html +++ b/dashboard-ui/index.html @@ -23,7 +23,7 @@
-
+
diff --git a/dashboard-ui/livetvchannel.html b/dashboard-ui/livetvchannel.html index 232ae2956c..f59bb868c3 100644 --- a/dashboard-ui/livetvchannel.html +++ b/dashboard-ui/livetvchannel.html @@ -4,15 +4,8 @@ Emby -
- +
+
diff --git a/dashboard-ui/livetvchannels.html b/dashboard-ui/livetvchannels.html deleted file mode 100644 index c4b36c85d6..0000000000 --- a/dashboard-ui/livetvchannels.html +++ /dev/null @@ -1,50 +0,0 @@ - - - - Emby - - -
- -
-
-
-
-
-
-
-
-
- -
-
- - -
-
-
-
- ${HeaderFilters} - - - - - - -
-
-
-
-
- - diff --git a/dashboard-ui/livetvguide.html b/dashboard-ui/livetvguide.html deleted file mode 100644 index eca998e943..0000000000 --- a/dashboard-ui/livetvguide.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - Emby - - -
- -
- -
-
-
-
- -
-
-
-
- -
- -
-
-
-
-
- -
-
- - diff --git a/dashboard-ui/livetvnewrecording.html b/dashboard-ui/livetvnewrecording.html index 20591409ed..f2a6a82dbf 100644 --- a/dashboard-ui/livetvnewrecording.html +++ b/dashboard-ui/livetvnewrecording.html @@ -4,15 +4,8 @@ Emby -
- +
+

diff --git a/dashboard-ui/livetvrecordinglist.html b/dashboard-ui/livetvrecordinglist.html index 4856c42db8..d5182aec3d 100644 --- a/dashboard-ui/livetvrecordinglist.html +++ b/dashboard-ui/livetvrecordinglist.html @@ -4,15 +4,8 @@ Emby -
- +
+
diff --git a/dashboard-ui/livetvrecordings.html b/dashboard-ui/livetvrecordings.html deleted file mode 100644 index 9900b36e6e..0000000000 --- a/dashboard-ui/livetvrecordings.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - Emby - - -
- - -
-
- - - -
-
-
- - diff --git a/dashboard-ui/livetvseriestimer.html b/dashboard-ui/livetvseriestimer.html index 34649212d2..cbc2ccd0cf 100644 --- a/dashboard-ui/livetvseriestimer.html +++ b/dashboard-ui/livetvseriestimer.html @@ -4,15 +4,8 @@ Emby -
- +
+

diff --git a/dashboard-ui/livetvseriestimers.html b/dashboard-ui/livetvseriestimers.html deleted file mode 100644 index 46c3bde1cc..0000000000 --- a/dashboard-ui/livetvseriestimers.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - Emby - - -
- -
-
- -
- -
- -
-
-
-
- - -
- - ${HeaderSortBy} - - - - - - - -
- -
- - ${HeaderSortOrder} - - - - - - - -
- -
- -
- - diff --git a/dashboard-ui/livetvsuggested.html b/dashboard-ui/livetvsuggested.html index fa55ca1789..6310c4eb86 100644 --- a/dashboard-ui/livetvsuggested.html +++ b/dashboard-ui/livetvsuggested.html @@ -4,46 +4,182 @@ Emby -
+
- -
-
-
-

${HeaderWhatsOnTV}

-
-
-
-
-

${HeaderUpcomingPrograms}

-
-
-
-
-
-

${HeaderUpcomingMovies}

- ${ButtonMoreItems} -
-
-
-
-
-
-

${HeaderUpcomingSports}

- ${ButtonMoreItems} -
-
-
-
+
+ + ${TabSuggestions} + ${TabGuide} + ${TabChannels} + ${TabRecordings} + ${TabScheduled} + ${TabSeries} + +
+ +
+
+ + +
+
+

${HeaderWhatsOnTV}

+
+
+
+
+

${HeaderUpcomingPrograms}

+
+
+
+
+
+

${HeaderUpcomingMovies}

+ ${ButtonMoreItems} +
+
+
+
+
+
+

${HeaderUpcomingSports}

+ ${ButtonMoreItems} +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+
+
+ +
+
+ + +
+
+
+
+ ${HeaderFilters} + + + + + + +
+
+
+
+
+
+ +
+ + + +
+
+ +
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+ + ${HeaderSortBy} + + + + + +
+
+ + ${HeaderSortOrder} + + + + + +
+
+
+
+
+
+
+ +
+
diff --git a/dashboard-ui/livetvtimer.html b/dashboard-ui/livetvtimer.html index a285e1d9f5..e411d8c1e7 100644 --- a/dashboard-ui/livetvtimer.html +++ b/dashboard-ui/livetvtimer.html @@ -4,15 +4,8 @@ Emby -
- +
+
diff --git a/dashboard-ui/livetvtimers.html b/dashboard-ui/livetvtimers.html deleted file mode 100644 index 06cc89b7df..0000000000 --- a/dashboard-ui/livetvtimers.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - Emby - - - - - diff --git a/dashboard-ui/mypreferencesmenu.html b/dashboard-ui/mypreferencesmenu.html index b07c985d92..bd37157185 100644 --- a/dashboard-ui/mypreferencesmenu.html +++ b/dashboard-ui/mypreferencesmenu.html @@ -73,7 +73,7 @@
${ButtonSyncSettings}
-
${ButtonSyncHelp}
+
${ButtonSyncSettingsHelp}
diff --git a/dashboard-ui/scripts/edititemimages.js b/dashboard-ui/scripts/edititemimages.js index cfe7625e3a..6c7316894a 100644 --- a/dashboard-ui/scripts/edititemimages.js +++ b/dashboard-ui/scripts/edititemimages.js @@ -275,7 +275,11 @@ html += '
'; - html += '

' + image.Width + ' X ' + image.Height + '

'; + if (image.Width && image.Height) { + html += '

' + image.Width + ' X ' + image.Height + '

'; + } else { + html += '

 

'; + } html += '

'; @@ -527,7 +531,7 @@ $('.uploadItemImageForm').off('submit', onSubmit).on('submit', onSubmit); - $('.btnOpenUploadMenu', page).on('click', function() { + $('.btnOpenUploadMenu', page).on('click', function () { $('#popupUpload', page).popup('open'); }); diff --git a/dashboard-ui/scripts/globalize.js b/dashboard-ui/scripts/globalize.js index 93bcec3a28..6cc94cb467 100644 --- a/dashboard-ui/scripts/globalize.js +++ b/dashboard-ui/scripts/globalize.js @@ -69,12 +69,16 @@ deferred.resolveWith(null, [culture]); }, function () { + + Logger.log('navigator.globalization.getLocaleName failed'); + deferred.resolveWith(null, [null]); }); - } else { + Logger.log('navigator.globalization.getLocaleName is unavailable'); + culture = document.documentElement.getAttribute('data-culture'); deferred.resolveWith(null, [culture]); } diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js index 8191bf6efd..32031c819f 100644 --- a/dashboard-ui/scripts/librarybrowser.js +++ b/dashboard-ui/scripts/librarybrowser.js @@ -192,6 +192,7 @@ configurePaperLibraryTabs: function (ownerpage, tabs, pages, defaultTabIndex) { tabs.hideScrollButtons = true; + tabs.noink = true; if (AppInfo.enableBottomTabs) { tabs.alignBottom = true; diff --git a/dashboard-ui/scripts/livetvchannels.js b/dashboard-ui/scripts/livetvchannels.js index 4855086b37..dfd049e936 100644 --- a/dashboard-ui/scripts/livetvchannels.js +++ b/dashboard-ui/scripts/livetvchannels.js @@ -77,11 +77,11 @@ $('#selectPageSize', page).val(query.Limit).selectmenu('refresh'); } - $(document).on('pageinitdepends', "#liveTvChannelsPage", function () { + $(document).on('pageinitdepends', "#liveTvSuggestedPage", function () { - var page = this; + var page = this.querySelector('.channelsTabContent'); - $('#chkFavorite', this).on('change', function () { + $('#chkFavorite', page).on('change', function () { query.StartIndex = 0; query.IsFavorite = this.checked ? true : null; @@ -90,7 +90,7 @@ }); - $('#chkLikes', this).on('change', function () { + $('#chkLikes', page).on('change', function () { query.StartIndex = 0; query.IsLiked = this.checked ? true : null; @@ -98,7 +98,7 @@ reloadItems(page); }); - $('#chkDislikes', this).on('change', function () { + $('#chkDislikes', page).on('change', function () { query.StartIndex = 0; query.IsDisliked = this.checked ? true : null; @@ -112,19 +112,27 @@ reloadItems(page); }); - }).on('pagebeforeshowready', "#liveTvChannelsPage", function () { + }); + + $(document).on('pageinitdepends', "#liveTvSuggestedPage", function () { - // Can't use pagebeforeshow here or the loading popup won't center correctly var page = this; - if (LibraryBrowser.needsRefresh(page)) { - query.UserId = Dashboard.getCurrentUserId(); - LibraryBrowser.loadSavedQueryValues('movies', query); - query.Limit = query.Limit || LibraryBrowser.getDefaultPageSize(); - reloadItems(page); - updateFilterControls(this); - } - + $(page.querySelector('neon-animated-pages')).on('tabchange', function () { + + if (parseInt(this.selected) == 2) { + var tabContent = page.querySelector('.channelsTabContent'); + + if (LibraryBrowser.needsRefresh(tabContent)) { + query.UserId = Dashboard.getCurrentUserId(); + LibraryBrowser.loadSavedQueryValues('movies', query); + query.Limit = query.Limit || LibraryBrowser.getDefaultPageSize(); + reloadItems(tabContent); + updateFilterControls(this); + } + } + }); + }); })(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/livetvguide.js b/dashboard-ui/scripts/livetvguide.js index b631c79275..422b215505 100644 --- a/dashboard-ui/scripts/livetvguide.js +++ b/dashboard-ui/scripts/livetvguide.js @@ -444,9 +444,9 @@ }); } - $(document).on('pageinitdepends', "#liveTvGuidePage", function () { + $(document).on('pageinitdepends', "#liveTvSuggestedPage", function () { - var page = this; + var page = this.querySelector('.guideTabContent'); Events.on(page.querySelector('.programGrid'), 'scroll', function () { @@ -485,13 +485,20 @@ selectDate(page); }); - }).on('pagebeforeshowready', "#liveTvGuidePage", function () { + }).on('pagebeforeshowready', "#liveTvSuggestedPage", function () { var page = this; - if (LibraryBrowser.needsRefresh(page)) { - reloadPage(page); - } + $(page.querySelector('neon-animated-pages')).on('tabchange', function () { + + if (parseInt(this.selected) == 1) { + var tabContent = page.querySelector('.guideTabContent'); + + if (LibraryBrowser.needsRefresh(tabContent)) { + reloadPage(tabContent); + } + } + }); }); })(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/livetvnewrecording.js b/dashboard-ui/scripts/livetvnewrecording.js index 9963b74a75..bb67f103d2 100644 --- a/dashboard-ui/scripts/livetvnewrecording.js +++ b/dashboard-ui/scripts/livetvnewrecording.js @@ -126,7 +126,7 @@ ApiClient.createLiveTvSeriesTimer(item).done(function () { Dashboard.hideLoadingMsg(); - Dashboard.navigate('livetvseriestimers.html'); + Dashboard.navigate('livetvsuggested.html'); }); @@ -134,7 +134,7 @@ ApiClient.createLiveTvTimer(item).done(function () { Dashboard.hideLoadingMsg(); - Dashboard.navigate('livetvtimers.html'); + Dashboard.navigate('livetvsuggested.html'); }); } diff --git a/dashboard-ui/scripts/livetvrecordings.js b/dashboard-ui/scripts/livetvrecordings.js index 85346f036d..9c57a9e3bf 100644 --- a/dashboard-ui/scripts/livetvrecordings.js +++ b/dashboard-ui/scripts/livetvrecordings.js @@ -52,7 +52,7 @@ } $('.recordingItems', elem).html(LibraryBrowser.getPosterViewHtml({ - + items: recordings, shape: "auto", showTitle: true, @@ -101,13 +101,20 @@ }); } - $(document).on('pagebeforeshowready', "#liveTvRecordingsPage", function () { + $(document).on('pagebeforeshowready', "#liveTvSuggestedPage", function () { var page = this; - if (LibraryBrowser.needsRefresh(page)) { - reload(page); - } + $(page.querySelector('neon-animated-pages')).on('tabchange', function () { + + if (parseInt(this.selected) == 3) { + var tabContent = page.querySelector('.recordingsTabContent'); + + if (LibraryBrowser.needsRefresh(tabContent)) { + reload(tabContent); + } + } + }); }); diff --git a/dashboard-ui/scripts/livetvseriestimers.js b/dashboard-ui/scripts/livetvseriestimers.js index e5516dd5d4..1d80f17f91 100644 --- a/dashboard-ui/scripts/livetvseriestimers.js +++ b/dashboard-ui/scripts/livetvseriestimers.js @@ -117,25 +117,32 @@ }).checkboxradio('refresh'); } - $(document).on('pagebeforeshowready', "#liveTvSeriesTimersPage", function () { + $(document).on('pagebeforeshowready', "#liveTvSuggestedPage", function () { var page = this; - if (LibraryBrowser.needsRefresh(page)) { - reload(page); - } + $(page.querySelector('neon-animated-pages')).on('tabchange', function () { - }).on('pageinit', "#liveTvSeriesTimersPage", function () { + if (parseInt(this.selected) == 5) { + var tabContent = page.querySelector('.seriesTimersTabContent'); - var page = this; + if (LibraryBrowser.needsRefresh(tabContent)) { + reload(tabContent); + } + } + }); - $('.radioSortBy', this).on('click', function () { + }).on('pageinitdepends', "#liveTvSuggestedPage", function () { + + var page = this.querySelector('.seriesTimersTabContent'); + + $('.radioSortBy', page).on('click', function () { query.StartIndex = 0; query.SortBy = this.getAttribute('data-sortby'); reload(page); }); - $('.radioSortOrder', this).on('click', function () { + $('.radioSortOrder', page).on('click', function () { query.StartIndex = 0; query.SortOrder = this.getAttribute('data-sortorder'); reload(page); diff --git a/dashboard-ui/scripts/livetvsuggested.js b/dashboard-ui/scripts/livetvsuggested.js index 9dcdcc3daf..eb578a5f4e 100644 --- a/dashboard-ui/scripts/livetvsuggested.js +++ b/dashboard-ui/scripts/livetvsuggested.js @@ -117,13 +117,56 @@ }); } - $(document).on('pagebeforeshowready', "#liveTvSuggestedPage", function () { + function loadSuggestedTab(page) { + + var tabContent = page.querySelector('.suggestedTabContent'); + + if (LibraryBrowser.needsRefresh(tabContent)) { + reload(tabContent); + } + } + + function loadTab(page, index) { + + switch (index) { + + case 0: + loadSuggestedTab(page); + break; + default: + break; + } + } + + $(document).on('pageinitdepends', "#liveTvSuggestedPage", function () { var page = this; - if (LibraryBrowser.needsRefresh(page)) { - reload(page); - } + var tabs = page.querySelector('paper-tabs'); + var pages = page.querySelector('neon-animated-pages'); + + LibraryBrowser.configurePaperLibraryTabs(page, tabs, pages); + + $(tabs).on('iron-select', function () { + var selected = this.selected; + + if (LibraryBrowser.navigateOnLibraryTabSelect()) { + + if (selected) { + Dashboard.navigate('livetvsuggested.html?tab=' + selected); + } else { + Dashboard.navigate('livetvsuggested.html'); + } + + } else { + page.querySelector('neon-animated-pages').selected = selected; + } + }); + + $(pages).on('tabchange', function () { + loadTab(page, parseInt(this.selected)); + }); + }); })(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/scripts/livetvtimer.js b/dashboard-ui/scripts/livetvtimer.js index 263ed70665..37ad1a7684 100644 --- a/dashboard-ui/scripts/livetvtimer.js +++ b/dashboard-ui/scripts/livetvtimer.js @@ -14,7 +14,7 @@ Dashboard.alert(Globalize.translate('MessageRecordingCancelled')); - Dashboard.navigate('livetvtimers.html'); + Dashboard.navigate('livetvsuggested.html'); }); } diff --git a/dashboard-ui/scripts/livetvtimers.js b/dashboard-ui/scripts/livetvtimers.js index 5b088c4278..58582f5103 100644 --- a/dashboard-ui/scripts/livetvtimers.js +++ b/dashboard-ui/scripts/livetvtimers.js @@ -42,7 +42,7 @@ var program = timer.ProgramInfo || {}; var imgUrl; - + if (program.ImageTags && program.ImageTags.Primary) { imgUrl = ApiClient.getScaledImageUrl(program.Id, { @@ -106,13 +106,20 @@ }); } - $(document).on('pagebeforeshowready', "#liveTvTimersPage", function () { + $(document).on('pagebeforeshowready', "#liveTvSuggestedPage", function () { var page = this; - if (LibraryBrowser.needsRefresh(page)) { - reload(page); - } + $(page.querySelector('neon-animated-pages')).on('tabchange', function () { + + if (parseInt(this.selected) == 4) { + var tabContent = page.querySelector('.timersTabContent'); + + if (LibraryBrowser.needsRefresh(tabContent)) { + reload(tabContent); + } + } + }); }); })(jQuery, document); \ No newline at end of file diff --git a/dashboard-ui/voice/voice.js b/dashboard-ui/voice/voice.js index eb5ef1bbfd..8d9a761364 100644 --- a/dashboard-ui/voice/voice.js +++ b/dashboard-ui/voice/voice.js @@ -341,12 +341,12 @@ function showCommand(result) { if (result.category == 'tvguide') { - Dashboard.navigate('livetvguide.html'); + Dashboard.navigate('livetvsuggested.html'); return; } if (result.category == 'recordings') { - Dashboard.navigate('livetvrecordings.html'); + Dashboard.navigate('livetvsuggested.html'); return; } }