John Firebaugh
6ef19d7e18
Remove unnecessary $(window).load() callbacks
...
All this is already inside a $(document).ready() callback.
2012-10-02 18:22:36 +01:00
John Firebaugh
f3afd43076
Avoid a JS error on (e.g.) ?way=nnnnn
...
When showing an object, the map location is not set
until the vector layer has finished loading. Thus
map.getCenter() returns null.
Registering the events earlier avoids the need to call
updateLocation manually at all.
2012-10-02 18:22:17 +01:00
John Firebaugh
569f3cbe9b
Remove unused event argument
2012-09-30 12:16:31 +01:00
John Firebaugh
7e3ca66fff
Use $(document).ready() to initialise browse JS
2012-09-30 12:15:49 +01:00
John Firebaugh
7c5d0fff3d
Move browse JS to page-specific script file
2012-09-30 12:14:25 +01:00
John Firebaugh
605c700895
Clean up search JS
...
Move it to index.js/edit.js and eliminate the global doSearch
function. Not enough code is shared to justify it.
2012-09-30 12:05:24 +01:00
John Firebaugh
e83d43ca82
Move edit JS to page-specific script file
2012-09-30 11:59:49 +01:00
John Firebaugh
87e8cf3b58
Require index-only JS in index.js
2012-09-30 11:58:14 +01:00
John Firebaugh
c4d9f902d0
Wrap index JS in a single $(document).ready()
2012-09-29 18:00:04 +01:00
John Firebaugh
352f2a1671
Move index JS to page-specific script file
2012-09-29 18:00:04 +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 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