diff --git a/MEETIT/Program.cs b/MEETIT/Program.cs index cf99629..243b63b 100644 --- a/MEETIT/Program.cs +++ b/MEETIT/Program.cs @@ -8,7 +8,7 @@ var builder = WebApplication.CreateBuilder(args); -builder.Services.AddCors(options => +/*builder.Services.AddCors(options => { options.AddPolicy(MyAllowSpecificOrigins, policy => @@ -17,7 +17,7 @@ .AllowAnyHeader() .AllowAnyMethod(); }); -}); +});*/ builder.Services.AddDbContext(options => options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection"))); @@ -55,7 +55,7 @@ } -app.UseCors(MyAllowSpecificOrigins); +//app.UseCors(MyAllowSpecificOrigins); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseDefaultFiles(); diff --git a/MEETIT/wwwroot/maps.js b/MEETIT/wwwroot/maps.js index 8a07f2c..f09b5e9 100644 --- a/MEETIT/wwwroot/maps.js +++ b/MEETIT/wwwroot/maps.js @@ -313,9 +313,11 @@ function calculateAndDisplayRoute(directionsService, directionsRenderer) { //add function to display route on map on button click function displayRoute() { + if (directionsRenderer != null) { + directionsRenderer.setMap(null); + } var directionsService = new google.maps.DirectionsService; directionsRenderer = new google.maps.DirectionsRenderer; - directionsRenderer.setMap(null); directionsRenderer.setMap(map); calculateAndDisplayRoute(directionsService, directionsRenderer); } diff --git a/MEETIT/wwwroot/nowywyjazd.html b/MEETIT/wwwroot/nowywyjazd.html index d91bb06..6bb5776 100644 --- a/MEETIT/wwwroot/nowywyjazd.html +++ b/MEETIT/wwwroot/nowywyjazd.html @@ -76,7 +76,7 @@
- +
0/150
diff --git a/MEETIT/wwwroot/wyjazdy.js b/MEETIT/wwwroot/wyjazdy.js index 662121b..961d981 100644 --- a/MEETIT/wwwroot/wyjazdy.js +++ b/MEETIT/wwwroot/wyjazdy.js @@ -58,7 +58,7 @@ var div = document.createElement('div'); } today = yyyy + '-' + mm + '-' + dd; if (today == wyjazd.date) { - div.style.backgroundColor="red"; + div.style.backgroundColor ="rgba(255, 0, 0,0.5)"; } @@ -166,8 +166,10 @@ window.onload = sessionStorage.removeItem("markersArray"); document.getElementById('lista-wyjazdow').addEventListener('click', function (e) { var id = e.target.parentElement.parentElement.id; var nazwa = e.target.parentElement.children[0].innerHTML; + var opis = e.target.parentElement.children[3].innerHTML; + console.log(opis); sessionStorage.setItem("trackName", nazwa); - sessionStorage.setItem("opis", e.target.parentElement.children[4].innerHTML); + sessionStorage.setItem("opis",opis); if (id != "") { getWyjazd(id); }