diff --git a/dashboard-ui/scripts/channelitems.js b/dashboard-ui/scripts/channelitems.js
index 0eee03b3dd..ea69e6d251 100644
--- a/dashboard-ui/scripts/channelitems.js
+++ b/dashboard-ui/scripts/channelitems.js
@@ -106,16 +106,14 @@
ApiClient.getItem(query.UserId, folderId).done(function (item) {
- $('.categoryTitle', page).show().html(item.Name);
- $('.channelHeader', page).show().html('
' + item.ChannelName + '').trigger('create');
+ LibraryMenu.setTitle(item.Name);
});
} else {
ApiClient.getItem(query.UserId, channelId).done(function (item) {
- $('.categoryTitle', page).hide().html(item.Name);
- $('.channelHeader', page).show().html('
' + item.Name + '');
+ LibraryMenu.setTitle(item.Name);
});
}
diff --git a/dashboard-ui/scripts/channels.js b/dashboard-ui/scripts/channels.js
index aee1be30bd..5ad8de4a07 100644
--- a/dashboard-ui/scripts/channels.js
+++ b/dashboard-ui/scripts/channels.js
@@ -63,13 +63,49 @@
}
- $(document).on('pagebeforeshowready', "#channelsPage", function () {
+ function loadTab(page, index) {
- LibraryBrowser.loadSavedQueryValues('channels', query);
+ switch (index) {
- reloadItems(this);
+ case 1:
+ LibraryBrowser.loadSavedQueryValues('channels', query);
+ reloadItems(page);
+ updateFilterControls(page);
+ break;
+ default:
+ break;
+ }
+ }
+
+ $(document).on('pageinitdepends', "#channelsPage", function () {
+
+ var page = this;
+
+ 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('channels.html?tab=' + selected);
+ } else {
+ Dashboard.navigate('channels.html');
+ }
+
+ } else {
+ page.querySelector('neon-animated-pages').selected = selected;
+ }
+ });
+
+ $(pages).on('tabchange', function () {
+ loadTab(page, parseInt(this.selected));
+ });
- updateFilterControls(this);
});
})(jQuery, document);
\ No newline at end of file
diff --git a/dashboard-ui/scripts/channelslatest.js b/dashboard-ui/scripts/channelslatest.js
index af00880b78..68a7ece872 100644
--- a/dashboard-ui/scripts/channelslatest.js
+++ b/dashboard-ui/scripts/channelslatest.js
@@ -2,12 +2,29 @@
function reloadItems(page) {
- Sections.loadLatestChannelItems(page.querySelector('.items'), Dashboard.getCurrentUserId());
+ Sections.loadLatestChannelItems(page.querySelector('.latestItems'), Dashboard.getCurrentUserId());
}
- $(document).on('pagebeforeshowready', "#channelsLatestPage", function () {
+ function loadTab(page, index) {
- reloadItems(this);
+ switch (index) {
+
+ case 0:
+ reloadItems(page);
+ break;
+ default:
+ break;
+ }
+ }
+
+ $(document).on('pageinitdepends', "#channelsPage", function () {
+
+ var page = this;
+ var pages = page.querySelector('neon-animated-pages');
+
+ $(pages).on('tabchange', function () {
+ loadTab(page, parseInt(this.selected));
+ });
});
diff --git a/dashboard-ui/scripts/itemdetailpage.js b/dashboard-ui/scripts/itemdetailpage.js
index b4dc8393d2..e80d94259c 100644
--- a/dashboard-ui/scripts/itemdetailpage.js
+++ b/dashboard-ui/scripts/itemdetailpage.js
@@ -209,7 +209,9 @@
function renderHeader(page, item, context) {
$('.itemTabs', page).hide();
- $('.channelHeader', page).hide();
+
+ $(page).removeClass('noSecondaryNavPage');
+
var elem;
if (context == 'home') {
@@ -264,7 +266,9 @@
}
}
else if (context == 'channels') {
- elem = $('.channelTabs', page).show();
+ $(page).addClass('noSecondaryNavPage');
+ LibraryMenu.setBackButtonVisible(true);
+ LibraryMenu.setMenuButtonVisible(false);
}
else if (item.Type == "MusicAlbum") {
$('#albumTabs', page).show();
@@ -279,8 +283,9 @@
}
else if (item.Type == "ChannelVideoItem" || item.Type == "ChannelAudioItem" || item.Type == "ChannelFolderItem") {
- $('#channelTabs', page).show();
- $('.channelHeader', page).show().html('
' + item.ChannelName + '').trigger('create');
+ $(page).addClass('noSecondaryNavPage');
+ LibraryMenu.setBackButtonVisible(true);
+ LibraryMenu.setMenuButtonVisible(false);
}
else if (item.Type == "BoxSet") {
@@ -849,7 +854,9 @@
playFromHere: true,
overlayText: true,
lazy: true,
- showDetailsMenu: true
+ showDetailsMenu: true,
+ overlayPlayButton: AppInfo.enableAppLayouts,
+ fullWidthOnMobile: AppInfo.enableAppLayouts
});
}
else if (item.Type == "GameSystem") {
diff --git a/dashboard-ui/scripts/librarybrowser.js b/dashboard-ui/scripts/librarybrowser.js
index cc8843ef17..5711c9fcc2 100644
--- a/dashboard-ui/scripts/librarybrowser.js
+++ b/dashboard-ui/scripts/librarybrowser.js
@@ -751,11 +751,7 @@
if (item.CollectionType == 'channels') {
- if (AppInfo.enableLatestChannelItems) {
- return 'channelslatest.html';
- } else {
- return 'channels.html';
- }
+ return 'channels.html';
}
if (context != 'folders') {
diff --git a/dashboard-ui/scripts/librarymenu.js b/dashboard-ui/scripts/librarymenu.js
index f556d9bb0b..f6f232e166 100644
--- a/dashboard-ui/scripts/librarymenu.js
+++ b/dashboard-ui/scripts/librarymenu.js
@@ -548,6 +548,32 @@
setTitle: function (title) {
document.querySelector('.libraryMenuButtonText').innerHTML = title;
+ },
+
+ setBackButtonVisible: function (visible) {
+
+ var backButton = document.querySelector('.headerBackButton');
+
+ if (backButton) {
+ if (visible) {
+ backButton.classList.remove('hide');
+ } else {
+ backButton.classList.add('hide');
+ }
+ }
+ },
+
+ setMenuButtonVisible: function (visible) {
+
+ var mainDrawerButton = document.querySelector('.mainDrawerButton');
+
+ if (mainDrawerButton) {
+ if (!visible && $.browser.mobile) {
+ mainDrawerButton.classList.add('hide');
+ } else {
+ mainDrawerButton.classList.remove('hide');
+ }
+ }
}
};
diff --git a/dashboard-ui/scripts/mediaplayer.js b/dashboard-ui/scripts/mediaplayer.js
index d6362faa3c..65ba9f5363 100644
--- a/dashboard-ui/scripts/mediaplayer.js
+++ b/dashboard-ui/scripts/mediaplayer.js
@@ -407,10 +407,10 @@
if (self.supportsTextTracks()) {
if (isVlc) {
- profile.SubtitleProfiles.push({
- Format: 'srt',
- Method: 'External'
- });
+ //profile.SubtitleProfiles.push({
+ // Format: 'srt',
+ // Method: 'External'
+ //});
profile.SubtitleProfiles.push({
Format: 'srt',
Method: 'Embed'
@@ -427,6 +427,10 @@
Format: 'pgs',
Method: 'Embed'
});
+ profile.SubtitleProfiles.push({
+ Format: 'vtt',
+ Method: 'Embed'
+ });
} else {
profile.SubtitleProfiles.push({
Format: 'vtt',