landing page: request departures when pressing enter

This commit is contained in:
Birte Kristina Friesel 2024-08-07 14:53:38 +02:00
parent 7e9f6bdf90
commit b49d042f9f
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA
2 changed files with 2 additions and 2 deletions

View file

@ -78,7 +78,7 @@ $(document).ready(function() {
} }
}; };
const geoLocationButton = $('div.geolocation > button'); const geoLocationButton = $('div.geolocation > .request');
const recentStops = geoLocationButton.data('recent'); const recentStops = geoLocationButton.data('recent');
const getGeoLocation = function() { const getGeoLocation = function() {
geoLocationButton.replaceWith($('<p class="geolocationhint">Stationen in der Umgebung:</p><div class="progress"><div class="indeterminate"></div></div>')); geoLocationButton.replaceWith($('<p class="geolocationhint">Stationen in der Umgebung:</p><div class="progress"><div class="indeterminate"></div></div>'));

View file

@ -58,7 +58,7 @@
<span class="card-title">Hallo, <%= $user->{name} %>!</span> <span class="card-title">Hallo, <%= $user->{name} %>!</span>
<p>Du bist gerade nicht eingecheckt.</p> <p>Du bist gerade nicht eingecheckt.</p>
<div class="geolocation" data-recent="<%= join('|', map { $_->{eva} . ';' . $_->{name} . ';' . $_->{hafas} } @{stash('recent_targets') // []} ) %>" data-backend="<%= $user->{backend_id} %>"> <div class="geolocation" data-recent="<%= join('|', map { $_->{eva} . ';' . $_->{name} . ';' . $_->{hafas} } @{stash('recent_targets') // []} ) %>" data-backend="<%= $user->{backend_id} %>">
<button class="btn waves-effect waves-light btn-flat">Stationen in der Umgebung abfragen</button> <a class="btn waves-effect waves-light btn-flat request">Stationen in der Umgebung abfragen</a>
</div> </div>
<div class="input-field"> <div class="input-field">
%= text_field 'station', id => 'station', class => 'autocomplete contrast-color-text', autocomplete => 'off', required => undef %= text_field 'station', id => 'station', class => 'autocomplete contrast-color-text', autocomplete => 'off', required => undef