diff --git a/dashboard-ui/css/site.css b/dashboard-ui/css/site.css index 1a228bec4d..cd8a8e6fd2 100644 --- a/dashboard-ui/css/site.css +++ b/dashboard-ui/css/site.css @@ -662,6 +662,11 @@ h1 .imageLink { padding-top: 5px; } +paper-input + .fieldDescription { + padding-top: 5px; + opacity: .9; +} + .warningFieldDescription { padding: 5px; border: 1px solid #f4c63f; diff --git a/dashboard-ui/scripts/wizardlivetvtuner.js b/dashboard-ui/scripts/wizardlivetvtuner.js new file mode 100644 index 0000000000..e6e4b78f99 --- /dev/null +++ b/dashboard-ui/scripts/wizardlivetvtuner.js @@ -0,0 +1,86 @@ +(function ($, document) { + + function save(page) { + + Dashboard.showLoadingMsg(); + + var apiClient = ApiClient; + + // After saving chapter task, now save server config + apiClient.getJSON(apiClient.getUrl('Startup/Configuration')).done(function (config) { + + config.LiveTvTunerType = $('#selectTunerType', page).val(); + config.LiveTvTunerPath = $('.txtDevicePath', page).val(); + + apiClient.ajax({ + + type: 'POST', + data: config, + url: apiClient.getUrl('Startup/Configuration') + + }).done(function () { + + Dashboard.hideLoadingMsg(); + navigateToNextPage(); + }); + }); + + } + + function reload(page) { + + Dashboard.showLoadingMsg(); + + var apiClient = ApiClient; + + apiClient.getJSON(apiClient.getUrl('Startup/Configuration')).done(function (config) { + + $('#selectTunerType', page).val(config.LiveTvTunerType || '').selectmenu("refresh"); + page.querySelector('.txtDevicePath').value = config.LiveTvTunerPath || ''; + + Dashboard.hideLoadingMsg(); + }); + } + + function navigateToNextPage() { + skip(); + } + + function skip() { + var apiClient = ApiClient; + + apiClient.getJSON(apiClient.getUrl('Startup/Info')).done(function (info) { + + if (info.SupportsRunningAsService) { + Dashboard.navigate('wizardservice.html'); + + } else { + Dashboard.navigate('wizardagreement.html'); + } + }); + } + + function onSubmit() { + var form = this; + + save(form); + + return false; + } + + $(document).on('pageinitdepends', "#wizardTunerPage", function () { + + var page = this; + + $('form', page).off('submit', onSubmit).on('submit', onSubmit); + + $('.btnSkip', page).on('click', skip); + + }).on('pageshowready', "#wizardTunerPage", function () { + + var page = this; + + reload(page); + }); + +})(jQuery, document, window); diff --git a/dashboard-ui/scripts/wizardsettings.js b/dashboard-ui/scripts/wizardsettings.js index a277fa6bc9..aac59670e6 100644 --- a/dashboard-ui/scripts/wizardsettings.js +++ b/dashboard-ui/scripts/wizardsettings.js @@ -59,17 +59,7 @@ function navigateToNextPage() { - var apiClient = ApiClient; - - apiClient.getJSON(apiClient.getUrl('Startup/Info')).done(function (info) { - - if (info.SupportsRunningAsService) { - Dashboard.navigate('wizardservice.html'); - - } else { - Dashboard.navigate('wizardagreement.html'); - } - }); + Dashboard.navigate('wizardlivetvtuner.html'); } function onSubmit() { diff --git a/dashboard-ui/strings/html/server.json b/dashboard-ui/strings/html/server.json index 3d6f74b2f1..5b363a9a5a 100644 --- a/dashboard-ui/strings/html/server.json +++ b/dashboard-ui/strings/html/server.json @@ -1524,5 +1524,8 @@ "HeaderMetadata": "Metadata", "HeaderRecordingOptions": "Recording Options", "ButtonShare": "Share", - "HeaderUpcomingForKids": "Upcoming for Kids" + "HeaderUpcomingForKids": "Upcoming for Kids", + "HeaderSetupLiveTV": "Setup Live TV", + "LabelTunerType": "Tuner type:", + "HelpMoreTunersCanBeAdded": "More tuners can be added later within the Live TV section." } diff --git a/dashboard-ui/thirdparty/paper-button-style.css b/dashboard-ui/thirdparty/paper-button-style.css index 95009d9cc8..eeae7acef4 100644 --- a/dashboard-ui/thirdparty/paper-button-style.css +++ b/dashboard-ui/thirdparty/paper-button-style.css @@ -381,13 +381,16 @@ paper-menu-item { paper-input label, paper-textarea label { font-size: 18px !important; font-family: inherit !important; - color: #858585 !important; } .ui-page-theme-b paper-input label, .ui-page-theme-b paper-textarea label { color: #858585 !important; } +.ui-page-theme-a paper-input label, .ui-page-theme-a paper-textarea label { + color: #222 !important; +} + .ui-page-theme-a .label-is-highlighted label { color: green !important; } diff --git a/dashboard-ui/wizardlivetvtuner.html b/dashboard-ui/wizardlivetvtuner.html new file mode 100644 index 0000000000..2b2450ccf8 --- /dev/null +++ b/dashboard-ui/wizardlivetvtuner.html @@ -0,0 +1,45 @@ + + +
+