Commit graph

109 commits

Author SHA1 Message Date
Tom Hughes
1e169bca25 Remove copy of Array.forEach that was committed accidentally 2012-08-30 19:17:11 +01:00
Tom Hughes
7b626f31be Use augment.js for improved cross browser compatibility
Remove the quick hack for that I added for Array.forEach and pull
in augment.js instead to add missing JS methods to older browsers.
2012-08-29 12:29:47 +01:00
Tom Hughes
a35cff243e Implement Array.forEach for browsers which don't have it 2012-08-29 09:30:14 +01:00
Tom Hughes
d9054cfe29 Move some javascript from the layout to application.js 2012-08-28 19:47:20 +01:00
Tom Hughes
b2bc61c5b1 Update the image size when we switch to the mapnik export format 2012-08-27 22:54:04 +01:00
John Firebaugh
07c997d1d2 Avoid polluting the global scope
Only startBrowse and startExport need to be exposed;
everything else can be scoped inside those functions.
2012-08-27 21:05:52 +01:00
John Firebaugh
5aa09fbfd0 Use a standard application.js bundle
Include map.js and menu.js in the bundle.
2012-08-27 20:31:17 +01:00
John Firebaugh
2e349ab51a Remove unused gem and add a comment where it was replaced 2012-08-27 20:29:56 +01:00
John Firebaugh
17b23b0756 Extract browse.js static asset 2012-08-27 20:23:24 +01:00
John Firebaugh
2feff4244f Reduce interpolation in browse/start.js.erb 2012-08-27 18:00:48 +01:00
John Firebaugh
cc4f133e64 Extract export.js static asset 2012-08-27 18:00:13 +01:00
John Firebaugh
c2333c603e Reduce interpolation in export/start.js.erb 2012-08-27 18:00:12 +01:00
Tom Hughes
7ad58d1411 Switch to using i18n-js for handling translations in javascript 2012-08-27 18:00:03 +01:00
John Firebaugh
dcb25f0c07 Set OpenLayers lang unobtrusively
We output the locale code as the lang attribute, so
use that rather than interpolating into embedded JS.
2012-08-24 19:00:59 -07:00
Tom Hughes
ea63736b5c Add an entry to the edit menu for turning on the notes layer 2012-08-22 21:50:48 +01:00
Tom Hughes
0d3a9ed9cb Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile.lock
	app/views/browse/_map.html.erb
	app/views/user/view.html.erb
	config/locales/en.yml
	config/openlayers.cfg
	db/structure.sql
	vendor/assets/openlayers/OpenLayers.js
2012-08-22 20:52:08 +01:00
Tom Hughes
fe16fec000 Start rewriting the notes layer for the front page 2012-08-22 20:37:09 +01:00
Tom MacWright
b812c070f1 Replace standard PanZoomBar control with new SimplePanZoom control 2012-08-08 18:20:02 +01:00
Tom Hughes
2a11b9682c Use a custom OpenLayers theme
Instead of having a customised copy of the default theme in the
app assets, use a custom theme that pulls in the default one and
then overrides things as needed.
2012-08-02 19:15:12 +01:00
Sarah Hoffmann
d97d3f76a6 Replace PanZoom control with Zoom control for small maps
In OpenLayers 2.12 the event handling of PanZoom and PanZoomBar clashes
with the result that the zoom level changes by two steps every time one
of the zoom buttons is pressed. Using the Zoom control fixes this issue.
2012-07-16 18:05:02 +01:00
Tom Hughes
efb80f8143 Update offset for marker icon to accurately position it 2012-07-12 21:02:18 +01:00
Tom Hughes
8e1b0b6908 Remove obsolete maxExtent from marker layer 2012-07-12 19:49:27 +01:00
Tom Hughes
b0453833b1 Replace use of Layer.GML with Layer.Vector 2012-06-28 18:18:42 +01:00
Tom Hughes
bad28a6478 Update OpenLayers to 2.12 2012-06-28 10:48:56 +01:00
Tom Hughes
cca526d939 Stop the menu appearing when the anchor is disabled 2012-04-23 20:59:28 +01:00
Tom Hughes
e2cb47f1ae Fix some issues with the new edit menu code
Make sure that the arrow icons are always displayed, and that menus
are aligned in the requested way.
2012-04-23 20:59:27 +01:00
Tom MacWright
c45dbdae36 Rework the edit tab and it's associated drop down menu
This changes the behavior of the editing tabs in three places. Instead
of the current hovering behavior, you can click on the arrow and get the
drop-down menu. Any click outside that on the page will deactivate the
menu, following the UI paradigm of most desktop environments.

This also simplifies the javascript code significantly.
2012-04-23 20:59:26 +01:00
Tom Hughes
bd14832cb5 Rearrange layer switcher assets 2012-03-28 21:18:47 +01:00
Tom MacWright
8f4ed911e0 Introduce a new layer switcher
The new layer switcher behaves the same as the standard one but
has less cruft and more attractive styling.
2012-03-28 21:06:08 +01:00
Tom Hughes
5e4357dd14 Only reload the preview if the content has changed 2012-03-17 16:36:58 +00:00
Tom Hughes
eb789dbf75 Show an animation while a preview is loading 2012-03-17 16:36:58 +00:00
Tom Hughes
561f2f694a Add preview functionality to rich text controls 2012-03-17 16:36:57 +00:00
Tom Hughes
b6163f0fc2 Grow text areas automatically in response to input 2012-03-17 16:36:57 +00:00
Tom MacWright
701325e9ef Change abstraction level for map functions
This commit should have no functional affect. It just changes the
abstraction level of OpenLayers from completely abstracting away
getMapExtent etc, to using OpenLayers's functionality directly but
providing proj and unproj to make projections palatable.
2012-03-14 19:01:45 +00:00
Tom MacWright
d13f0b7088 Remove dead code 2012-03-13 08:46:58 +00:00
Tom Hughes
e660e60966 Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile
	Gemfile.lock
	lib/migrate.rb
2012-03-08 18:23:27 +00:00
Tom Hughes
b61e414356 Rename "Mapnik" to "Standard" in the layer switcher 2012-03-01 12:18:55 +00:00
Tom Hughes
acbd254e4a Remove the osmarender map layer 2012-03-01 09:45:41 +00:00
Tom Hughes
bdf476d8cf Make sure we don't attach alert handler multiple times
Before adding a "not zoomed in enough" alert handler, make sure any
existing handler is removed. Fixes #17.
2012-02-21 19:22:01 +00:00
Tom MacWright
eb8efa0a4b Fixes and cleanups suggested by JSHint 2012-02-01 00:25:10 +00:00
Tom Hughes
3ecf431f7e Move notes resources to assets directory 2012-01-07 16:36:58 +00:00
Tom Hughes
ae9131bc8e Allow OpenStreetMap.js to work with an unpatched OpenLayers 2011-12-31 00:25:04 +00:00
Tom Hughes
4fb53e9619 Fix OpenLayers image URL rewriting 2011-12-30 19:05:40 +00:00
Tom Hughes
da78800060 Patch OpenLayers to make URL rewriting easier
This provides a single routine that can be overridden to rewrite
all image URLs to use the asset pipeine.
2011-12-30 18:32:53 +00:00
Tom Hughes
90f119d976 Fix loading of blank tiles on some browsers to use the asset pipeline 2011-12-19 17:56:00 +00:00
Tom Hughes
13289d4041 Switch from Prototype to jQuery 2011-11-26 00:22:31 +00:00
Tom Hughes
4368ba9f11 Wrap the OpenLayers.Util.createDiv routine 2011-11-26 00:15:12 +00:00
Tom Hughes
5275794aec Wrap another OpenLayers image creation routine 2011-11-26 00:07:45 +00:00
Tom Hughes
61e756c625 Handle openlayers.js as a template 2011-11-25 23:14:16 +00:00
Tom Hughes
477b765c42 Force all OpenLayers resources to load through the asset pipeline 2011-11-25 23:00:30 +00:00