From cc4119feb52170879732575bd83d214698187a20 Mon Sep 17 00:00:00 2001 From: Tor-Einar Skog <tor-einar.skog@nibio.no> Date: Thu, 31 Oct 2024 10:43:38 +0100 Subject: [PATCH] feat: Fix table layout, remove debug output --- cydiapomonella/static/js/cydiapomonella.js | 4 +--- cydiapomonella/templates/cydiapomonella/index.html | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/cydiapomonella/static/js/cydiapomonella.js b/cydiapomonella/static/js/cydiapomonella.js index 85cabdda..05103bc1 100644 --- a/cydiapomonella/static/js/cydiapomonella.js +++ b/cydiapomonella/static/js/cydiapomonella.js @@ -210,11 +210,9 @@ class CydiaPomonella if(this.getSelectedWeatherdataSourceType() == this.WEATHER_DATASOURCE_TYPE_WEATHERSTATION) { const selectedWeatherstationId = parseInt(this.getSelectedWeatherstation()); - console.info(selectedWeatherstationId); this.appleWeatherStations.forEach((ws)=>{ if(ws.id == selectedWeatherstationId) { - console.info("Found " + ws.name); weatherStationName = ws.name; } }); @@ -264,7 +262,7 @@ class CydiaPomonella renderTable(hourlyData, dailyData) { - document.getElementById("weatherData").style.display="block"; + document.getElementById("weatherData").style.display="table"; let tableBody = document.getElementById("tableBody"); tableBody.innerHTML = ""; let currentDate = this.getStartDateHourly(); diff --git a/cydiapomonella/templates/cydiapomonella/index.html b/cydiapomonella/templates/cydiapomonella/index.html index 880e4a13..7b6bb63e 100644 --- a/cydiapomonella/templates/cydiapomonella/index.html +++ b/cydiapomonella/templates/cydiapomonella/index.html @@ -177,10 +177,10 @@ Created: 2024-10-28 <input type="radio" name="weatherdataType" id="coordinates" value="coordinates" checked onchange="displayCoordinatesInput()"> for et spesifikt punkt (koordinater) </label> - <div id="input-coordinates" class="form-inline"> + <div id="input-coordinates" class="form-inline" style="margin-top: 10px;"> <input type="text" class="form-control" name="latitude" id="latitude" onchange="runModel()" placeholder="Breddegrad" aria-label="Breddegrad"> <input type="text" class="form-control" name="longitude" id="longitude" onchange="runModel()" placeholder="Lengdegrad" aria-label="Lengdegrad"> - <button type="button" class="btn btn-primary" onclick="openCoordinatesMap()"><i class="fa fa-map-marker fa-lg"></i> Velg i kart</button> + <button type="button" class="btn btn-primary" onclick="openCoordinatesMap()" style="margin-left: 5px;"><i class="fa fa-map-marker fa-lg"></i> Velg i kart</button> </div> <div id="coordinates-map" class="map-modal"></div> </div> @@ -189,11 +189,11 @@ Created: 2024-10-28 <input type="radio" name="weatherdataType" id="weatherstation" value="weatherstation" onchange="displayWeatherstationInput()"> fra en værstasjon </label> - <div id="input-weatherstation" class="form-inline" style="display: none;"> - <select name="weatherStationName" id="weatherStationId" class="form-control" onchange="runModel();"> + <div id="input-weatherstation" class="form-inline" style="margin-top: 10px; display: none;"> + <select name="weatherStationName" id="weatherStationId" class="form-control" style="width: 60%;" onchange="runModel();"> <option value="-1">-- {% trans "Select weather station" %} --</option> </select> - <button type="button" class="btn btn-primary" onclick="openPoiMap()"><i class="fa fa-map-marker fa-lg"></i> Velg i kart</button> + <button type="button" class="btn btn-primary" onclick="openPoiMap()" style="margin-left: 5px;"><i class="fa fa-map-marker fa-lg"></i> Velg i kart</button> </div> <div id="poi-map" class="map-modal"></div> </div> -- GitLab