Commit graph

91 commits

Author SHA1 Message Date
Tom Hughes
51a2d85053 Merge remote-tracking branch 'upstream/pull/5694' 2025-02-20 22:08:02 +00:00
Marwin Hochfelsner
e6b0e1ae7e Associate search input with route destination instead of departure 2025-02-19 17:06:36 +01:00
Marwin Hochfelsner
3939f24460 Enable exporting direction paths 2025-02-17 11:39:36 +01:00
Tom Hughes
c47cb299a8 Replace uses of var with let or const as appropriate 2025-02-16 11:14:13 +00:00
Marwin Hochfelsner
e1055764d8 Get directions using fetch
Co-authored-by: Holger Jeromin <h.jeromin@beckhoff.com>
2025-02-12 05:13:12 +01:00
Marwin Hochfelsner
a3c45f6ed6 Reduce condition complexity 2025-02-09 06:51:56 +01:00
Marwin Hochfelsner
628f6149d1
Close directions popup with sidebar 2025-02-04 07:16:05 +01:00
Tom Hughes
46cd3a1114 Replace qs with URLSearchParams 2025-02-02 19:27:20 +00:00
Tom Hughes
8f7f02b025 Merge remote-tracking branch 'upstream/pull/5064' 2025-02-02 12:44:27 +00:00
Marwin Hochfelsner
4b6b49801c Add coordinate precision function 2025-02-02 01:37:07 +01:00
Anton Khorev
a1051b418e Swap cached reverse geocodes when reversing directions
Do this instead of putting reversed input values into url.
2024-09-08 10:38:53 +03:00
Anton Khorev
bb9a8958fb Remove latlng parameter from endpoint.setValue 2024-09-08 10:31:10 +03:00
Anton Khorev
b4925d7b0d Limit coordinate precision in drag listener 2024-08-20 14:55:29 +03:00
Tom Hughes
99a7d21a9b Merge remote-tracking branch 'upstream/pull/5095' 2024-08-19 19:05:44 +01:00
Anton Khorev
93a9f31bf0 Show/hide "Where is this?" when setting search value from directions 2024-08-19 20:05:48 +03:00
Anton Khorev
c9f495cb18 Remove endpoint markers in disable method 2024-08-19 19:39:53 +03:00
Anton Khorev
dad6bca753 Install endpoint listeners using enable/disable methods 2024-08-19 19:39:53 +03:00
Tom Hughes
41b81bd393 Merge remote-tracking branch 'upstream/pull/5083' 2024-08-18 12:16:22 +01:00
Anton Khorev
80c43f51c2 Copy "From" endpoint value to search input when closing directions 2024-08-16 18:48:05 +03:00
Anton Khorev
e624871eb4 Remove endpoint.hasGeocode state and related getRoute code
hasGeocode didn't actually indicated if an endpoint has a value acquired from a geocoder. It was set to true when at least one call to a geocoder finished successfully, including getting an empty result. getRoute doesn't need to know what calls were made, it only needs coordinates. It also doesn't get to decide when to fetch coordinates, this is done in drag/change callbacks.
2024-08-16 08:53:34 +03:00
Anton Khorev
ec6789920c Rename geocodeCallback to changeCallback, call it from latlon setValue
endpoint.setValue always calls changeCallback on its successful completion, with geocoding or without. This allows to decide when to call getRoute entirely from callbacks and event listeners.
2024-08-15 12:00:31 +03:00
Anton Khorev
e0df084e57 Don't call endpoint.setLatLng() from outside of endpoint module 2024-08-14 05:11:56 +03:00
Anton Khorev
415f497d89 Move endpoints code to its own module 2024-08-10 06:19:32 +03:00
Anton Khorev
567a9e5b23 Rename route request variable
It's not boolean, the comment was outdated.
2024-08-10 06:01:35 +03:00
Anton Khorev
d065f88b1a Remove references to global variables from endpoint drag listener
This causes visible input value updates even when the route is not recalculated. The upside is that it lets endpoints not know about the route and its update state.
2024-08-10 05:53:59 +03:00
Anton Khorev
b5070d97a9 Introduce geocode event callback for route endpoints
Removes remaining getRoute() call from endpoint objects.
2024-06-15 22:26:23 +03:00
Anton Khorev
d3ab0c9a8a Introduce drag event callback for route endpoints
Avoids calling getRoute() from within endpoint objects.
2024-06-15 21:51:48 +03:00
Tom Hughes
84aa7f455a Merge remote-tracking branch 'upstream/pull/4897' 2024-06-14 18:02:50 +01:00
Anton Khorev
6c3c4f2751 Use .is-invalid to highlight routing inputs with failed geocode lookups 2024-06-14 19:42:45 +03:00
Anton Khorev
5944feb008 Remove global "awaiting geocode" routing state 2024-06-14 19:14:49 +03:00
Anton Khorev
6ae4e53f45 Use flex in routing form to fix marker column width 2024-06-03 12:21:11 +03:00
Tom Hughes
161fc8ac47 Replace deprecated text-muted class with text-body-secondary 2024-05-22 11:58:32 +01:00
Anton Khorev
48fc453dd0 Use Bootstrap hoverable rows in directions tables 2024-04-15 18:52:19 +03:00
Anton Khorev
62ba143c3c Remove some search/directions custom css 2023-10-20 16:58:59 +03:00
Andy Allan
5473be178a Refactor the directions table to use bootstrap table styling
This allows us to remove some custom CSS
2023-09-13 11:30:50 +01:00
Tom Hughes
4e0c5f5fcb Make distances in directions translatable
Fixes #3888
2023-01-10 20:58:10 +00:00
Anton Khorev
6c415ef142 Add aria-label to close buttons 2022-10-31 23:54:58 +03:00
Anton Khorev
58f0eea2a4 Remove unnecessary wrapper divs 2022-09-20 10:15:19 +03:00
Anton Khorev
fb75f447d7 Remove top margins from close buttons 2022-09-02 17:02:46 +03:00
Anton Khorev
351a785949 Remove geolink and close button nesting 2022-09-01 00:42:50 +03:00
Anton Khorev
f41b5558b7 Position directions close button with flex 2022-08-28 00:32:50 +03:00
Anton Khorev
66e526c2d5 Changed directions close button to Bootstrap 2022-07-27 20:54:47 +03:00
Andy Allan
c8f0a81eb7 Rework sidebar to use padding on the sidebar_content div
This saves every header, list, paragraph etc having to sort out their own padding. The couple of instances where we want edge-to-edge can be acheived using the negative margin spacing utilities.

The padding is based on $spacer so that it can be adjusted automatically via bootstrap configuration.

This also means that we can remove many (mis-)uses of the browse-section class, which is only supposed to be for cases where there are multiple browse-sections in sequence (e.g. multiple nodes in the node history browse pages).
2021-06-16 15:45:58 +01:00
Andy Allan
c2587b5b57 Rework the routing credit to use a bootstrap class
The padding is unnecessary given it's in a paragraph anyway.
2021-06-16 13:28:33 +01:00
Tom Hughes
0a15112423 Mark javascript issued cookies with SameSite=Lax 2021-05-17 19:06:43 +01:00
Tom Hughes
32cc04fa5c Switch to using js-cookie to manage cookies from javascript 2021-05-17 18:57:48 +01:00
Tom Hughes
f91dd6afc2 Tighten up cookie security
Mark all cookies as Secure, and the cookies which are not
modified client side as HttpOnly.
2021-02-19 18:18:13 +00:00
Tucker Chapman
d257e67842 Remove conditional for polyline layer
When a user searches for a route and one is not found the polyline
layer is removed - if they then change the mode of transportation the
event listener will not reroute if there is no polyline layer.

This commit removes the conditional that prevents the routing code from
re-running after the polyline has been removed.

Fixes #3050
Closes #3055
2021-01-28 10:31:33 +00:00
Tom Hughes
79447e7549 Replace querystring parser with qs yarn module 2020-08-06 20:51:55 +01:00
Holger Jeromin
c70e919b47
rename internal variable 2020-02-26 20:27:52 +01:00