Commit graph

41 commits

Author SHA1 Message Date
Tom Hughes
5777c5e925 Tidy up the data browser javascript 2011-04-03 14:59:43 +01:00
Frederik Ramm
59dcc8b253 Add 'hide areas' button to data view 2011-04-03 14:54:32 +01:00
Tom Hughes
5c520a928b Work around change in handler behaviour in OpenLayers 2.10
We need to install the endDrag routine as the "done" handler after
creating the control otherwise the control will overwrite our handler
with one of it's own.
2010-09-15 10:52:04 +01:00
Tom Hughes
f07819d81a Rework application configuration
Use a preinitializer to load the settings from application.yml so
that they are available as early as possible. All settings can also
be overridden using environment variables.

The ad-hoc settins in environment.rb are then moved to this new
system so we have one consistent location for settings.
2010-08-04 22:06:05 +01:00
Tom Hughes
1997f1f662 Don't close the sidebar when the visibility of the data layer changes
if the browser isn't active. Closes #2684.
2010-02-03 23:35:55 +00:00
Ævar Arnfjörð Bjarmason
658a34714f When displaying objects in /browse/* and in the JavaScript "Data"
feature use the name key corresponding to the user's
locale. E.g. "name:is" for Icelandic.

This will fall back on "name". The interface will be equivalent unless
the user has selected another language than English in the preferences
and objects with localized name:* tags corresponding to the user's
language are being displayed.
2009-09-17 23:36:54 +00:00
Tom Hughes
a8c7d1c4ce Don't use single quotes to wrap translated strings in javascript in case
the translation contains an apostrophe. Closes #1942.
2009-06-09 18:59:44 +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
Ævar Arnfjörð Bjarmason
cc5694da1c More progress on ticket:1919
These messages now don't use JavaScript string concatenation but
variable interpolation:

 * browse.start_rjs.history_for_feature
 * browse.start_rjs.edited_by_user_at_timestamp
 * browse.start_rjs.object_list.selected.type.node
 * browse.start_rjs.object_list.selected.type.way
 * browse.start_rjs.object_list.history.type.node
 * browse.start_rjs.object_list.history.type.way

These previously extant messages have been deleted, merged, and given
more descriptive names:

 * browse.start_rjs.history_for
 * browse.start_rjs.edited_by
 * browse.start_rjs.at_timestamp
2009-06-06 19:22:39 +00:00
Ævar Arnfjörð Bjarmason
de18f26d3c Nuked 'browse.start_rjs.unable_to_load' and replaced it with
'browse.start_rjs.unable_to_load_size' which solves #1919 some more.
2009-06-06 18:25:41 +00:00
Ævar Arnfjörð Bjarmason
3622db1665 Don't hardcode bbox size 0.25, use APP_CONFIG['max_request_area'] instead 2009-06-06 18:13:11 +00:00
Ævar Arnfjörð Bjarmason
b653ace377 Implement a hack so that we can interpolate JavaScript variables in
translation strings from Ruby, doing the string replacement lient-side
instead of on the server.

This partially solves ticket:1919. I still have to move the rest of
the JS functions over to the new system.
2009-06-06 17:57:08 +00:00
Tom Hughes
91aaae1933 Improve the data browser translation logic. 2009-06-06 15:46:41 +00:00
Ævar Arnfjörð Bjarmason
c875a70b31 Made a bunch of start.rjs stuff translatable, including
* Object list, API, Display object list, Details

Also make node/way/relation translatable, and in different contexts
too (e.g. Icelandic needs this).

This introduces more stuff that needs to be fixed in ticket 1919.
2009-06-06 15:05:39 +00:00
Shaun McDonald
010dc87195 Fix typo, which meant that there was a missing translation when selecting an area in the databrowser data browser that was too large 2009-05-31 23:02:50 +00:00
Andy Allan
4e0cf1c5d3 Databrowser i18n. The stuff in start.rjs is a bit bizarre and might need a second pair of eyes 2009-05-30 17:45:31 +00:00
Andy Allan
cdbfc1e341 Override interestingTagsExclude in GML layer - improve databrowser in US by ignoring vanilla TIGER nodes 2009-05-22 14:20:22 +00:00
Tom Hughes
4d62aea5ec Destroy OL objects which use the dataLayer before we destroy the layer
or we will get errors which stop the rest of stopBrowse() executing.
2009-05-11 10:31:34 +00:00
Shaun McDonald
bf29550db8 Resyncing from head 10895:11795 2008-11-08 11:52:58 +00:00
Tom Hughes
63c2d9a529 Make data browser work with OpenLayers 2.7. 2008-10-08 23:38:45 +00:00
Tom Hughes
36203ebe26 Don't hardcode the API version in the data browser. 2008-07-04 18:15:42 +00:00
Tom Hughes
08d1f5aaab Quote default when used as a key in a hash as it is a keyword... 2008-06-28 09:59:47 +00:00
Tom Hughes
f053c84723 Improve the layout of the browse sidebar a bit. 2008-05-28 23:46:55 +00:00
Tom Hughes
18777b41ea Tidy up map browse code and qualify various global names to avoid
any risk of conflicts.
2008-05-15 16:57:34 +00:00
Christopher Schmidt
ca0989f90f destroy the box handler as well 2008-04-26 16:33:26 +00:00
Christopher Schmidt
b46655b167 define type earlier 2008-04-23 16:39:20 +00:00
Christopher Schmidt
f4dfa0f93b UI changes from RichardF 2008-04-23 14:58:25 +00:00
Christopher Schmidt
e6de9accd2 move data into a layer in the layerswitcher 2008-04-23 13:59:41 +00:00
Christopher Schmidt
f06af0508c very minor ui niggles 2008-04-23 04:28:42 +00:00
Christopher Schmidt
8a9261ea07 prevent errors when closing sidebar 2008-04-23 04:25:39 +00:00
Christopher Schmidt
dffe87909d add link to history html page 2008-04-22 13:59:00 +00:00
Christopher Schmidt
670d15e4c9 add support for displaying history 2008-04-22 13:52:41 +00:00
Christopher Schmidt
25fa17d612 change layout: now a link, no longer a tab 2008-04-22 12:48:26 +00:00
Christopher Schmidt
24c623fdf2 minor clenaups 2008-04-22 11:41:57 +00:00
Christopher Schmidt
19a57c97b1 don't let users select areas bigger than allowed 2008-04-22 11:29:24 +00:00
Christopher Schmidt
adc823ce1b allow down/up events 2008-04-22 11:19:12 +00:00
Christopher Schmidt
98be40a312 Customize requestSuccess to limit number of features actually drawn on the map 2008-04-22 11:14:58 +00:00
Christopher Schmidt
d3314fee0f Add recent nodes to start of tab, and return false from onclick actions 2008-04-22 04:28:37 +00:00
Christopher Schmidt
ea0f8ee5c3 clean up javascript code. no/few functional changes, afaik. 2008-04-22 04:05:37 +00:00
Christopher Schmidt
a5509e3172 destroy the feature when we leave 2008-04-21 23:22:08 +00:00
Christopher Schmidt
336a80530c add in-map node/way browser 2008-04-21 23:18:08 +00:00