Tom Hughes
f4dba81b64
Modify the existing i18n() javascript function to lookup strings in
...
the javascript i18n array as well as expanding arguments, and make all
lookups go through it.
2009-10-02 23:41:19 +00:00
Tom Hughes
596ab82461
Move javascript translations to a separate key based on the path to
...
the javascript file that uses them and amend the layout to automatically
find and output all javascript strings.
2009-10-02 23:33:17 +00:00
Ævar Arnfjörð Bjarmason
b0e1560875
Some of our JavaScript files have UI messages but we don't want to
...
make them dynamic.
So I'm creating a globally scoped JavaScript array called rails_i18n
which holds some of these messages. It's loaded in <head> before any
of the JavaScript files so it should always be available.
2009-10-02 20:19:28 +00:00
Tom Hughes
7a7c567436
Remove layers argument from the shortlink if we change to mapnik from
...
a non-mapnik layer.
2009-08-13 14:02:49 +00:00
Richard Fairhurst
369202787b
Potlatch 1.1 (server code)
2009-07-08 20:52:02 +00:00
Matt Amos
57e571d241
Changed shortlink zoom level correction char to '-', as this seems to fare better with twitter et al.'s URL highlighting. Decoder is backwards-compatible with the old system.
2009-07-02 16:40:29 +00:00
Ævar Arnfjörð Bjarmason
85f317b46e
Add B000FTFT (as well as B000FTF) to the list of layers we should
...
ignore when constructing the shortlink.
The shortlink was also broken for the new /?{node,way,relation}=id
construct since the code assumed that all URL parameters that weren't
lat/lon/zoom/layers could be safely ignored. I've added
node/way/relation to that list but for future-proofness it might be
better to simply check if there's anything left in ''args'' that we
don't know how to encode, rather than checking on values we know about
now.
2009-06-29 09:47:35 +00:00
Tom Hughes
e46c82fe3d
Tidy up some recent commits:
...
- Simplify shortlinkPrefix by removing redundant code.
- Factor out duplicate code for displaying objects on maps.
- Reindent some stuff to make it more readable.
2009-06-27 17:11:54 +00:00
Ævar Arnfjörð Bjarmason
d63f13c18d
Make ?{node,way,relation}=id GET argumens work for the shortlink as
...
well as the permalink.
2009-06-27 16:11:21 +00:00
Ævar Arnfjörð Bjarmason
05bc2b70ed
Only hardcode http://osm.org/ in shortlinks when we're at
...
openstreetmap.org (according to window.location.hostname).
Solves ticket:1994 and my headaches when trying to hack railsport
locally.
2009-06-27 16:07:53 +00:00
Ævar Arnfjörð Bjarmason
34b147266c
Change the feature commited in [16174] to use the main map view
...
instead of being located at /map.
2009-06-27 15:34:26 +00:00
Shaun McDonald
ddf44b07c8
Hard code osm.org into the shortcode permalink.
2009-06-26 11:02:00 +00:00
Matt Amos
1d8e66016c
Adding 'shortlink' functions which will allow URLs like http://osm.org/go/XXXX suitable for use in twitter, etc...
2009-06-25 23:31:53 +00:00
Tom Hughes
fc398f6441
Rework the javascript I18n interpolation a bit - the interpolation function
...
is now in site.js so everything can use it, and the syntax has changed a bit
to avoid the need for double interpolation.
2009-06-07 08:32:39 +00:00
Tom Hughes
044febd3aa
Disabled edit tab until z13 is reached.
2009-05-27 13:34:50 +00:00
Harry Wood
1c93d482d2
change updatelinks params so that Potlatch can pass in the view bbox. Also check if it's missing. closes #1738
2009-04-23 14:38:40 +00:00
Thomas Wood
d7663e7d14
Fix multiple issues with links to /history from the homepage. Thanks to Ed Avis for bringing this to our attention.
2009-04-22 17:08:04 +00:00
Harry Wood
0f3e5a28c0
show a 'no bbox specified' message for the moment at least. Due to inconsistent location detecting across tabs, the history tab often gets nil bbox (Need to fix for all tabs) + other history tab tweaks
2009-03-24 11:23:56 +00:00
Harry Wood
d3c6087409
js changes for 'history' tab
2009-03-23 16:41:18 +00:00
Tom Hughes
52a6df0548
Simplify URLs a bit.
2008-04-17 17:38:48 +00:00
Tom Hughes
599c48227a
Ajaxify the export tab.
2008-04-16 23:45:16 +00:00
Tom Hughes
3cd04f7db4
Don't set the layers argument if the caller didn't specify it.
2007-12-31 10:13:36 +00:00
Tom Hughes
e373c63837
Round latitude and longitude values in links to a sensible number of
...
decimal places for the zoom level whilst still preserving accuracy
sufficient to position the map within a few pixels.
The relationship between zoom level, decimal places, and the accuracy
with which the map can then be positioned in pixels is as follows:
Zoom Decimals Accuracy (pixels)
1 0 1.42
2 0 2.84
3 1 0.57
4 1 1.14
5 1 2.28
6 2 0.46
7 2 0.91
8 2 1.82
9 3 0.36
10 3 0.73
11 3 1.46
12 4 0.29
13 4 0.58
14 4 1.17
15 5 0.23
16 5 0.47
17 5 0.93
18 6 0.19
So the worse case is at zoom 2 where accuracy is still within 3 pixels.
Based on a patch by rjmunro.
2007-10-23 09:19:29 +00:00
Tom Hughes
8dfecbfbb2
Only the view and edit tabs really need updating when the map moves.
2007-08-14 10:44:56 +00:00
Tom Hughes
397db07d65
New improved geocoder with extra added AJAX and OSM Namefinder support.
2007-08-07 17:09:37 +00:00
Tom Hughes
9634ab8fc1
Remember which layers are active in the cookie and URLs.
2007-07-29 14:06:04 +00:00
Tom Hughes
e0013130c2
Don't try and update links on nodes whose names match member functions
...
of the JavaScript Array object...
2007-06-14 09:29:32 +00:00
Tom Hughes
7b9272ffa6
Make sure we always put a valid URL on the edit tab, and allow switching
...
to the editor to work from z11 instead of z14 as that is what Potlatch
supports.
Also fix default zooms for Potlatch when no position is given.
2007-06-13 10:02:37 +00:00
Tom Hughes
c99992f85f
Be a bit more intelligent when trying to update the arguments on a link.
2007-06-12 16:16:49 +00:00
Steve Coast
2fad5f7c92
various skeleton stuff
2006-07-28 22:35:05 +00:00
Steve Coast
b4c0bfd8fa
more basic framework
2006-07-28 21:53:30 +00:00