more fixes, AI

This commit is contained in:
2026-03-31 22:10:30 +02:00
parent de1fa76e40
commit 2beb7aa75a
14 changed files with 121 additions and 67 deletions

View File

@@ -14,26 +14,26 @@
{% addtoblock "css" strip %}<link
rel="stylesheet"
href="{{STATIC_URL}}/css/datepicker.css"
href="{% static 'css/datepicker.css' %}"
type="text/css"
media="screen"
/>
{% endaddtoblock %} {% addtoblock "css" strip %}<link
rel="stylesheet"
href="{{STATIC_URL}}/css/timepicker.css"
href="{% static 'css/timepicker.css' %}"
type="text/css"
media="screen"
/>
{% endaddtoblock %} {% addtoblock "css" strip %}<link
rel="stylesheet"
href="{{STATIC_URL}}/css/jquery-ui-1.8.21.custom.css"
href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.13.2/themes/smoothness/jquery-ui.css"
type="text/css"
media="screen"
/>
{% endaddtoblock %} {% addtoblock "js" %}
<script src="{{STATIC_URL}}/js/bootstrap-timepicker.js"></script>
<script src="{{STATIC_URL}}/js/bootstrap-datepicker.js"></script>
<script src="{{STATIC_URL}}/js/bootstrap-datepicker.de.js"></script>
<script src="{% static 'js/bootstrap-timepicker.js' %}"></script>
<script src="{% static 'js/bootstrap-datepicker.js' %}"></script>
<script src="{% static 'js/bootstrap-datepicker.de.js' %}"></script>
<script>

View File

@@ -3,7 +3,7 @@ Coordinates or textual adresses: {{route.origin}} {{route.destination}} Event
object: {{route.event}} {% endcomment %} {% load sekizai_tags static %}
{% if route %} {% addtoblock "css" strip %}<link
rel="stylesheet"
href="{{STATIC_URL}}/css/concert_route.css"
href="{% static 'css/concert_route.css' %}"
type="text/css"
media="screen"
/>{% endaddtoblock %} {% addtoblock "js" strip %}
@@ -74,23 +74,21 @@ object: {{route.event}} {% endcomment %} {% load sekizai_tags static %}
google.maps.event.addDomListener(controlUI, 'click', function()
{
{% if not route.event.map_location %}
geocoder = new google.maps.Geocoder();
geocoder.region = "de";
geocoder.geocode( {"address": "{{ route.event.location }}" }, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
map.setMapTypeId( google.maps.MapTypeId.HYBRID );
map.setZoom( 15 );
map.setCenter( results[0].geometry.location );
var geocoder = new google.maps.Geocoder();
geocoder.geocode( {"address": "{{ route.event.location }}", "region": "de" }, function(results, status) {
if (status === google.maps.GeocoderStatus.OK) {
map.setMapTypeId(google.maps.MapTypeId.HYBRID);
map.setZoom(15);
map.setCenter(results[0].geometry.location);
} else {
console.error("Geocoding failed: " + status);
}
});
{% else %}
var loc = new google.maps.LatLng( {{ route.event.map_location }} );
map.setMapTypeId( google.maps.MapTypeId.HYBRID );
map.setZoom( 20 );
map.setCenter( loc );
var loc = new google.maps.LatLng({{ route.event.map_location }});
map.setMapTypeId(google.maps.MapTypeId.HYBRID);
map.setZoom(20);
map.setCenter(loc);
{% endif %}
});
}
@@ -116,11 +114,11 @@ object: {{route.event}} {% endcomment %} {% load sekizai_tags static %}
var request = {
origin: "{{route.origin}}",
destination: "{{route.destination}}",
travelMode: google.maps.DirectionsTravelMode.DRIVING
travelMode: google.maps.TravelMode.DRIVING
}
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
if (status === google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
var leg = response.routes[0].legs[0];