mirror of
https://github.com/manilarome/the-glorious-startpage.git
synced 2024-11-23 16:13:28 +01:00
fix ugly weather settings naming
This commit is contained in:
parent
77923ede1c
commit
c7b55d2e38
10
index.html
10
index.html
@ -92,18 +92,18 @@
|
|||||||
|
|
||||||
<div class='header' id='weatherSettingsHeader'>
|
<div class='header' id='weatherSettingsHeader'>
|
||||||
<div class='headerIcon' id='weatherSettingsHeaderIcon'></div>
|
<div class='headerIcon' id='weatherSettingsHeaderIcon'></div>
|
||||||
<label for='apiBox' class='headerLabel' id='weatherSettingsHeaderLabel'>Weather Settings</label>
|
<label for='apiKeySet' class='headerLabel' id='weatherSettingsHeaderLabel'>Weather Settings</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id='weatherSettingsContainer'>
|
<div id='weatherSettingsContainer'>
|
||||||
<div class='weatherSettingsGroups' id='weatherSettingsAPIKey'>
|
<div class='weatherSettingsGroups' id='weatherSettingsAPIKey'>
|
||||||
<label for='apiBox' class='weatherSettingsLabels'>API Key</label>
|
<label for='apiKeySet' class='weatherSettingsLabels'>API Key</label>
|
||||||
<input type='text' class='weatherSettingsInputs' id='apiBox' autocomplete='off' placeholder='API KEY'/>
|
<input type='text' class='weatherSettingsInputs' id='apiKeySet' autocomplete='off' placeholder='API KEY'/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='weatherSettingsGroups' id='weatherSettingsCityID'>
|
<div class='weatherSettingsGroups' id='weatherSettingsCityID'>
|
||||||
<label for='cityBox' class='weatherSettingsLabels'>City ID</label>
|
<label for='cityIDSet' class='weatherSettingsLabels'>City ID</label>
|
||||||
<input type='text' class='weatherSettingsInputs' id='cityBox' autocomplete='off' placeholder='City ID'/>
|
<input type='text' class='weatherSettingsInputs' id='cityIDSet' autocomplete='off' placeholder='City ID'/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class='weatherSettingsGroups' id='weatherSettingsUnitsSelect'>
|
<div class='weatherSettingsGroups' id='weatherSettingsUnitsSelect'>
|
||||||
|
@ -8,8 +8,8 @@ class WeatherSettings {
|
|||||||
this._cityID = '';
|
this._cityID = '';
|
||||||
this._units = '';
|
this._units = '';
|
||||||
|
|
||||||
this._apiBox = document.querySelector('#apiBox');
|
this._apiKeySet = document.querySelector('#apiKeySet');
|
||||||
this._cityBox = document.querySelector('#cityBox');
|
this._cityIDSet = document.querySelector('#cityIDSet');
|
||||||
|
|
||||||
this._weatherSelectUnits = document.querySelector('#weatherSelectUnits');
|
this._weatherSelectUnits = document.querySelector('#weatherSelectUnits');
|
||||||
|
|
||||||
@ -38,15 +38,15 @@ class WeatherSettings {
|
|||||||
|
|
||||||
// Reset textboxes
|
// Reset textboxes
|
||||||
_deleteWeatherSettingsValue = () => {
|
_deleteWeatherSettingsValue = () => {
|
||||||
this._apiBox.value = '';
|
this._apiKeySet.value = '';
|
||||||
this._cityBox.value = '';
|
this._cityIDSet.value = '';
|
||||||
this._weatherSelectUnits.value = 'metric';
|
this._weatherSelectUnits.value = 'metric';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update textbox placeholders
|
// Update textbox placeholders
|
||||||
_updateWeatherSettingsPlaceholder = () => {
|
_updateWeatherSettingsPlaceholder = () => {
|
||||||
this._apiBox.placeholder = this._appID;
|
this._apiKeySet.placeholder = this._appID;
|
||||||
this._cityBox.placeholder = this._cityID;
|
this._cityIDSet.placeholder = this._cityID;
|
||||||
this._weatherSelectUnits.value = this._units;
|
this._weatherSelectUnits.value = this._units;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -77,8 +77,8 @@ class WeatherSettings {
|
|||||||
|
|
||||||
_weatherApplyOnClickEvent = e => {
|
_weatherApplyOnClickEvent = e => {
|
||||||
this._applyWeatherSettings(
|
this._applyWeatherSettings(
|
||||||
this._apiBox.value || this._apiBox.placeholder,
|
this._apiKeySet.value || this._apiKeySet.placeholder,
|
||||||
this._cityBox.value || this._cityBox.placeholder,
|
this._cityIDSet.value || this._cityIDSet.placeholder,
|
||||||
this._weatherSelectUnits.options[this._weatherSelectUnits.selectedIndex].value
|
this._weatherSelectUnits.options[this._weatherSelectUnits.selectedIndex].value
|
||||||
);
|
);
|
||||||
this._updateWeatherSettings();
|
this._updateWeatherSettings();
|
||||||
|
Loading…
Reference in New Issue
Block a user