1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

restored weather settings

This commit is contained in:
Luke Pulverenti 2013-06-24 10:06:25 -04:00
parent 85f129c738
commit 96901cdc32
2 changed files with 19 additions and 1 deletions

View file

@ -11,6 +11,20 @@
<form id="clientSettingsForm">
<ul data-role="listview" class="ulForm">
<li>
<label for="txtWeatherLocation">Weather location: </label>
<input id="txtWeatherLocation" name="txtWeatherLocation" type="text" />
<div class="fieldDescription">
US zip code / City, State, Country / City, Country
</div>
</li>
<li>
<label for="selectWeatherUnit">Weather display unit: </label>
<select id="selectWeatherUnit" name="selectWeatherUnit">
<option value="Celsius">Celsius</option>
<option value="Fahrenheit">Fahrenheit</option>
</select>
</li>
<li>
<label for="txtMinResumePct">Min resume percentage: </label>
<input type="number" id="txtMinResumePct" name="txtMinResumePct" pattern="[0-9]*" required="required" min="0" max="100" />

View file

@ -8,9 +8,11 @@
ApiClient.getServerConfiguration().done(function (config) {
$('#txtWeatherLocation', page).val(config.WeatherLocation);
$('#txtMinResumePct', page).val(config.MinResumePct);
$('#txtMaxResumePct', page).val(config.MaxResumePct);
$('#txtMinResumeDuration', page).val(config.MinResumeDurationSeconds);
$('#selectWeatherUnit', page).val(config.WeatherUnit).selectmenu("refresh");
$('input:first', page).focus();
@ -29,6 +31,8 @@
ApiClient.getServerConfiguration().done(function (config) {
config.WeatherLocation = $('#txtWeatherLocation', form).val();
config.WeatherUnit = $('#selectWeatherUnit', form).val();
config.MinResumePct = $('#txtMinResumePct', form).val();
config.MaxResumePct = $('#txtMaxResumePct', form).val();
config.MinResumeDurationSeconds = $('#txtMinResumeDuration', form).val();