diff --git a/dashboard-ui/dashboardgeneral.html b/dashboard-ui/dashboardgeneral.html index ed478ba6ef..c1d0d92101 100644 --- a/dashboard-ui/dashboardgeneral.html +++ b/dashboard-ui/dashboardgeneral.html @@ -29,7 +29,7 @@
${LabelPreferredDisplayLanguageHelp}
-
+
${LabelReadHowYouCanContribute}
diff --git a/dashboard-ui/scripts/wizardstartpage.js b/dashboard-ui/scripts/wizardstartpage.js index 1421ad9ccc..d6f5529ab4 100644 --- a/dashboard-ui/scripts/wizardstartpage.js +++ b/dashboard-ui/scripts/wizardstartpage.js @@ -1,6 +1,59 @@ -var WizardStartPage = { +(function (window, $) { - gotoNextPage: function () { - Dashboard.navigate('wizarduser.html'); + function loadPage(page, config, languageOptions) { + + $('#selectLocalizationLanguage', page).html(languageOptions.map(function (l) { + + return ''; + + })).val(config.UICulture).selectmenu('refresh'); + + Dashboard.hideLoadingMsg(); } -}; \ No newline at end of file + + function save(page) { + + Dashboard.showLoadingMsg(); + + ApiClient.getServerConfiguration().done(function (config) { + + config.UICulture = $('#selectLocalizationLanguage', page).val(); + + ApiClient.updateServerConfiguration(config).done(function (result) { + + Dashboard.navigate('wizarduser.html'); + + }); + }); + + } + + $(document).on('pageshow', "#wizardStartPage", function () { + + Dashboard.showLoadingMsg(); + + var page = this; + + var promise1 = ApiClient.getServerConfiguration(); + + var promise2 = $.getJSON(ApiClient.getUrl("Localization/Options")); + + $.when(promise1, promise2).done(function (response1, response2) { + + loadPage(page, response1[0], response2[0]); + + }); + + }); + + window.WizardStartPage = { + + onSubmit: function () { + + save($(this).parents('.page')); + + return false; + } + }; + +})(window, jQuery); \ No newline at end of file diff --git a/dashboard-ui/wizardlibrary.html b/dashboard-ui/wizardlibrary.html index 5de6f08afc..4ec525fa57 100644 --- a/dashboard-ui/wizardlibrary.html +++ b/dashboard-ui/wizardlibrary.html @@ -11,7 +11,8 @@

${HeaderSetupLibrary}

- + +

diff --git a/dashboard-ui/wizardstart.html b/dashboard-ui/wizardstart.html index 8868876f2c..02d5191cdf 100644 --- a/dashboard-ui/wizardstart.html +++ b/dashboard-ui/wizardstart.html @@ -9,16 +9,31 @@

-

- ${WelcomeToMediaBrowser}

+
+

+ ${WelcomeToMediaBrowser}

-

${ThisWizardWillGuideYou}

-
- -
+

${ThisWizardWillGuideYou}

+ +
    +
  • + + +
  • +
+ +
+ +
+
+ +