Commit graph

6 commits

Author SHA1 Message Date
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
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
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