Skip to content

Commit

Permalink
opisy
Browse files Browse the repository at this point in the history
  • Loading branch information
Maciej Krause committed Dec 14, 2023
1 parent 1ff20c2 commit b2242db
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 3 additions & 3 deletions MEETIT/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
var builder = WebApplication.CreateBuilder(args);


builder.Services.AddCors(options =>
/*builder.Services.AddCors(options =>
{
options.AddPolicy(MyAllowSpecificOrigins,
policy =>
Expand All @@ -17,7 +17,7 @@
.AllowAnyHeader()
.AllowAnyMethod();
});
});
});*/

builder.Services.AddDbContext<AppDbContext>(options =>
options.UseSqlServer(builder.Configuration.GetConnectionString("DefaultConnection")));
Expand Down Expand Up @@ -55,7 +55,7 @@
}


app.UseCors(MyAllowSpecificOrigins);
//app.UseCors(MyAllowSpecificOrigins);
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseDefaultFiles();
Expand Down
4 changes: 3 additions & 1 deletion MEETIT/wwwroot/maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion MEETIT/wwwroot/nowywyjazd.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</div>
<div class="resztav2" style="display: flex">
<div class="textarea-container">
<textarea class="panel-opis" placeholder="opis"></textarea>
<textarea id="opis" class="panel-opis" placeholder="opis"></textarea>
<div id="wordCount">0/150</div>
</div>
<div class="zapisywanie" style="margin-left: 120px">
Expand Down
6 changes: 4 additions & 2 deletions MEETIT/wwwroot/wyjazdy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)";
}


Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit b2242db

Please sign in to comment.