diff --git a/dashboard-ui/channelsettings.html b/dashboard-ui/channelsettings.html new file mode 100644 index 0000000000..b2ef47520e --- /dev/null +++ b/dashboard-ui/channelsettings.html @@ -0,0 +1,46 @@ + + + + ${TitleChannels} + + +
+ +
+
+
+
+ +
    +
  • + + +
    ${LabelChannelStreamOptionBestAvailableHelp}
    +
  • +
+
    +
  • + + +
  • +
+
+ +
+
+ + +
+ + diff --git a/dashboard-ui/css/librarymenu.css b/dashboard-ui/css/librarymenu.css index d6150ffa2b..be20167107 100644 --- a/dashboard-ui/css/librarymenu.css +++ b/dashboard-ui/css/librarymenu.css @@ -196,28 +196,26 @@ .viewMenuTextLink { display: block; - padding: .6em .5em .6em 43px!important; + padding: .6em .5em .6em 39px!important; font-size: 15px; font-weight: 300!important; font-family: Roboto; background-repeat: no-repeat; - background-size: 18px 18px; - background-position: 16px center; + background-size: 14px 14px; + background-position: 14px center; } .musicViewMenu { background-image: url(images/items/folders/music.png); - background-position: 16px 8px; + background-position: 14px 8px; } .homeViewMenu { background-image: url(images/items/folders/home.png); - background-position: 16px 9px; } .tvshowsViewMenu { background-image: url(images/items/folders/tv.png); - background-position: 16px center; } .moviesViewMenu, .trailersViewMenu { @@ -226,12 +224,10 @@ .gamesViewMenu { background-image: url(images/items/folders/games.png); - background-position: 16px 8px; } .channelsViewMenu { background-image: url(images/items/folders/channels.png); - background-position: 16px 9px; } .booksViewMenu { @@ -240,12 +236,10 @@ .musicvideosViewMenu { background-image: url(images/items/folders/musicvideos.png); - background-position: 16px 8px; } .photosViewMenu { background-image: url(images/items/folders/photos.png); - background-position: 16px 8px; } .homeVideosViewMenu { @@ -258,7 +252,6 @@ .editorViewMenu { background-image: url(images/items/folders/edit.png); - background-position: 16px 8px; } .dashboardViewMenu { diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 91dc189330..df5df8bf90 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -291,7 +291,7 @@ h1 .imageLink { .sidebarLinks a { display: block; - padding: 12px 20px 12px 30px; + padding: 10px 20px 10px 30px; text-decoration: none; color: #fff!important; text-shadow: none!important; @@ -311,7 +311,7 @@ h1 .imageLink { .sidebarDivider { height: 1px; - background: #404040; + background: #383838; margin: .25em 0; } diff --git a/dashboard-ui/scripts/backdrops.js b/dashboard-ui/scripts/backdrops.js index f19528333e..f6871efabd 100644 --- a/dashboard-ui/scripts/backdrops.js +++ b/dashboard-ui/scripts/backdrops.js @@ -100,22 +100,28 @@ } var userId = Dashboard.getCurrentUserId(); - + var val = LocalSettings.val('enableBackdrops', userId); return val != '0'; } - $(document).on('pagebeforeshow', ".backdropPage", function () { + $(document).on('pagebeforeshow', ".page", function () { var page = this; - if (enabled()) { - var type = page.getAttribute('data-backdroptype'); + if ($(page).hasClass('backdropPage')) { - showBackdrop(type); + if (enabled()) { + var type = page.getAttribute('data-backdroptype'); + + showBackdrop(type); + + } else { + $(page).removeClass('backdropPage'); + clearBackdrop(); + } } else { - $(page).removeClass('backdropPage'); clearBackdrop(); } diff --git a/dashboard-ui/scripts/channelitems.js b/dashboard-ui/scripts/channelitems.js index 0a8e59fff3..3a83d4194b 100644 --- a/dashboard-ui/scripts/channelitems.js +++ b/dashboard-ui/scripts/channelitems.js @@ -142,7 +142,7 @@ coverImage: true }); - html += LibraryBrowser.getPagingHtml(pagingHtml); + html += pagingHtml; $('#items', page).html(html).trigger('create').createPosterItemMenus(); diff --git a/dashboard-ui/scripts/channelsettings.js b/dashboard-ui/scripts/channelsettings.js new file mode 100644 index 0000000000..a324e73081 --- /dev/null +++ b/dashboard-ui/scripts/channelsettings.js @@ -0,0 +1,47 @@ +(function ($, document, window) { + + function loadPage(page, config) { + + $('#selectChannelResolution', page).val(config.ChannelOptions.PreferredStreamingWidth || '') + .selectmenu("refresh"); + + Dashboard.hideLoadingMsg(); + } + + $(document).on('pageshow', "#channelSettingsPage", function () { + + Dashboard.showLoadingMsg(); + + var page = this; + + ApiClient.getServerConfiguration().done(function (config) { + + loadPage(page, config); + + }); + + }); + + function onSubmit() { + + Dashboard.showLoadingMsg(); + + var form = this; + + ApiClient.getServerConfiguration().done(function (config) { + + // This should be null if empty + config.ChannelOptions.PreferredStreamingWidth = $('#selectChannelResolution', form).val() || null; + + ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult); + }); + + // Disable default form submission + return false; + } + + window.ChannelSettingsPage = { + onSubmit: onSubmit + }; + +})(jQuery, document, window); diff --git a/dashboard-ui/scripts/site.js b/dashboard-ui/scripts/site.js index fe5a4871de..f0800459c3 100644 --- a/dashboard-ui/scripts/site.js +++ b/dashboard-ui/scripts/site.js @@ -748,8 +748,12 @@ var Dashboard = { href: "autoorganizelog.html", selected: page.hasClass("organizePage") }, { - name: "DLNA", + name: "Channels", divider: true, + href: "channelsettings.html", + selected: page.hasClass("channelSettingsPage") + }, { + name: "DLNA", href: "dlnasettings.html", selected: page.hasClass("dlnaPage") }, { @@ -780,7 +784,6 @@ var Dashboard = { selected: pageElem.id == "scheduledTasksPage" || pageElem.id == "scheduledTaskPage" }, { name: "Help", - divider: true, href: "support.html", selected: pageElem.id == "supportPage" || pageElem.id == "logPage" || pageElem.id == "supporterPage" || pageElem.id == "supporterKeyPage" || pageElem.id == "aboutPage" }];