restored weather settings
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -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();
|
||||
@@ -43,4 +47,4 @@
|
||||
|
||||
window.ClientSettingsPage = new clientSettingsPage();
|
||||
|
||||
})($, document, window);
|
||||
})($, document, window);
|
||||
Reference in New Issue
Block a user