Commit graph

34 commits

Author SHA1 Message Date
Anton Khorev
21a08ca546 Update secondary nav active item highlight from js router 2024-09-03 02:59:18 +03:00
Anton Khorev
31ca37a1d0 Remove fallback code for undefined history.pushState() 2022-12-07 10:57:30 +03:00
Tom Hughes
492a640530 Enable a few more eslint checks 2019-07-14 12:08:02 +01:00
Tom Hughes
c4c0e8105a Enforce consistent indentation in javascript code 2019-07-14 10:52:18 +01:00
Tom Hughes
176b853174 Fix new eslint warnings 2019-06-12 19:27:58 +01:00
Tom Hughes
5bd59e1936 Enable a number of eslint style rules 2019-04-07 17:02:39 +01:00
Tom Hughes
eb7678145a Use double quotes consistently in javascript code 2019-04-06 15:59:34 +01:00
Tom Hughes
1596713871 Fix some JSHint complaints 2015-02-23 21:45:57 +00:00
Matt Amos
0cb475cc1a Merge remote-tracking branch 'upstream/master' into routing-merge
Conflicts:
	app/assets/javascripts/index.js
	config/locales/en.yml
2014-11-10 16:14:06 +00:00
Tom Hughes
6b09732854 Don't enable query mode when loading a query URL 2014-11-05 21:03:14 +00:00
Matt Amos
a3eb48385b Merge remote-tracking branch 'upstream/master' into routing
Conflicts:
	app/assets/javascripts/index.js
	app/assets/javascripts/leaflet.map.js.erb
	config/environments/production.rb
	config/locales/de.yml
2014-11-03 11:08:13 +00:00
John Firebaugh
f2bf38606e Permalinks for directions 2014-05-14 15:52:25 -07:00
Tom Hughes
4cad1970fb Make sure the hash updates properly on browse pages
Rework the way the move listener is disabled during initial
positiong of pages to avoid accidentally leaving it disabled
for the first user move of the map in some cases.
2014-03-16 14:11:29 +00:00
Tom Hughes
9b35270d0b Update map state when following a client side route 2014-03-13 13:37:45 +00:00
Dan Stowell
bc67479bcc jsrouting: clear search boxes on page unload 2014-03-09 15:06:08 +00:00
John Firebaugh
69aca22e6a Run unload method before pushing the new state
If running unload causes any hash changes, those should
not end up on the new URL.

Fixes #622
2013-12-05 20:17:24 +00:00
Tom Hughes
6670de16a1 Make remote edit work when /edit is loaded
Change detection of the edit request to use the URL as the class
will not be set on the body now, and force the router to think we
actually loaded the normal view.
2013-12-05 10:40:21 +00:00
John Firebaugh
07976676de Restore support for #layers=X with no map parameter
https://trac.openstreetmap.org/ticket/5056
2013-12-03 19:37:25 +00:00
Tom Hughes
ba4a3e3ce9 Remove debugging code 2013-12-03 19:04:15 +00:00
Tom Hughes
78f8e2a450 Throw an exception instead of logging to the console 2013-12-03 18:15:02 +00:00
Tom Hughes
e18c3fd58d Log failures to match a route for the initial path 2013-12-03 17:51:01 +00:00
Tom Hughes
a30a29f41a Fix stripping of trailing slash 2013-12-01 22:30:34 +00:00
Tom Hughes
96babc10b0 Strip any trailing slash from the initial location 2013-12-01 21:47:55 +00:00
Tom Hughes
3cd5f45e08 Simplify browse routes and make routes more consistent
This gets rid of the /browse/ prefix and uses /history consistently
for all routes that show a list of changesets.
2013-11-28 00:14:07 +00:00
Tom Hughes
8b84f11a45 There are four methods, not three 2013-11-25 21:13:59 +00:00
John Firebaugh
0dbd18e2bb Document/clarify OSM.Router use 2013-11-25 13:10:07 -08:00
Aaron Lidman
fec9dc84c0 No hash on browse pages, closes #35 2013-11-14 17:41:20 -08:00
John Firebaugh
c9600ea323 Expose more router functions 2013-11-14 12:26:58 -08:00
John Firebaugh
f24309ad3e Don't set state if it doesn't exist 2013-11-13 16:01:54 -08:00
John Firebaugh
1082d3a653 preserve visual center of map on sidebar transitions 2013-11-11 14:42:59 -08:00
John Firebaugh
a805e0b545 Use our own hash implementation
We need more flexibility than L.Hash provides.
2013-11-11 14:42:59 -08:00
John Firebaugh
e68e3e9150 Ignore hashchange-triggered popstate events here too 2013-11-08 13:42:24 -08:00
John Firebaugh
35458c0096 Convert search to pushState 2013-10-13 14:46:08 -07:00
John Firebaugh
a56d1036d5 pushState based navigation between map-based layouts 2013-10-13 14:46:08 -07:00