Commit graph

79 commits

Author SHA1 Message Date
Tom Hughes
0b981e4b7f Generate proper descriptions for notes 2012-09-23 15:30:19 +01:00
Tom Hughes
90fe21a04a Remove redundant code 2012-09-23 15:07:35 +01:00
Tom Hughes
1f06652075 Add support for creating new notes 2012-09-23 15:05:03 +01:00
Tom Hughes
74543b630e Use standard indentation 2012-09-20 16:04:25 +01:00
Tom Hughes
4d91fe3dd9 Merge branch 'master' into openstreetbugs
Conflicts:
	Gemfile
	app/helpers/application_helper.rb
	app/views/site/index.html.erb
2012-09-20 16:01:24 +01:00
John Firebaugh
0509fc8d12 Move param-based map configuration to client
This prepares us for hash-based permalinks (#81) and removes
the duplication between index.html.erb and SiteController#edit.
2012-09-18 08:56:45 +01:00
John Firebaugh
14a7d1abfc Use jquery.cookie 2012-09-18 08:55:27 +01:00
John Firebaugh
3b1f455dd9 Extract layer configuration to map.js 2012-09-16 16:25:33 +01:00
John Firebaugh
e338d11408 Move resize JS to application bundle 2012-09-07 13:05:25 -07:00
John Firebaugh
7ff77d9d3d Trigger map.updateSize() via a custom event 2012-09-07 13:04:48 -07:00
Tom Hughes
b507f6c887 Make active highlighting work properly again 2012-09-07 09:40:05 +01:00
Tom Hughes
d76aa13ddd Use the jQuery data() function to access HTML 5 data attributes 2012-09-06 21:29:16 +01:00
Tom Hughes
7af04f8691 Move rich text support code into a separate file 2012-09-06 20:44:24 +01:00
Tom MacWright
02de53eb45 Refactor view and css code around homepage links
This adds a new class to the body which we can use to do more styling
in CSS rather than erb-embedded Ruby. The only visual change is that
there's now a subtle transition for homepage links becoming active.
2012-09-06 20:28:23 +01:00
Tom Hughes
7c0055b5d7 Move piwik code to a static JS asset 2012-09-06 09:02:51 +01:00
Tom Hughes
815c98c977 Select which key entries to show on the client
Rather than requesting a new key every time the zoom or layer
changes, serve up all the entries initially with appropriate
annotations to allow the client to decide which ones to show.
2012-08-31 10:29:32 +01:00
John Firebaugh
519c7dc2dd Move key JS to application bundle 2012-08-30 15:34:26 -07:00
Tom Hughes
d7da1562c3 Get rid of the sidebar's onclose global state 2012-08-30 23:02:54 +01:00
Tom MacWright
93c392cf5f Basic javascript cleanup
Unifies some logic, cleans up style.
2012-08-30 21:27:57 +01:00
John Firebaugh
d6a8aaa369 Move sidebar JS to application bundle
It's required on the main page so will nearly always be loaded anyway.

Enclosed in an anonymous function to avoid leaking the onclose global.
2012-08-30 20:30:11 +01:00
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