From 7574c68da088130108b9e21f0e39f9ae859e31e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Y=C3=BBki=20Vachot?= Date: Sun, 28 Nov 2021 21:25:24 +0100 Subject: [PATCH] Update for Datalore Partie 4 --- static/js/weather.app.js | 15 --------------- templates/index.html | 27 ++++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/static/js/weather.app.js b/static/js/weather.app.js index 7b7525e..aed31f2 100644 --- a/static/js/weather.app.js +++ b/static/js/weather.app.js @@ -253,7 +253,6 @@ function updateForecast(forecast){ $("#cityName").text(city.name); $("#cityCode").text(city.cp); var data = forecast.forecast.METEOCONCEPT.forecast; - console.log(data); // Present day var today = data[0]; @@ -281,14 +280,6 @@ function updateForecast(forecast){ } } -// Refresh button handler -$("#refreshButton").on("click", function(){ - // Starts Refresh button's spinning animation - $("#refreshButton").html(""); - getWeatherData(); - getForecastData(); -}); - // Applies the following format to date: WeekDay, Month Day, Year function getFormattedDate(date){ var options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; @@ -304,10 +295,4 @@ function toCamelCase(str) { } ); return arr.join(" "); -} - - -// Converts to Celcius -function toCelcius(val){ - return Math.round((val - 32) * (5/9)); } \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 0aa296c..746540e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -169,7 +169,7 @@ \ No newline at end of file