X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/d59d6009e9585d49547959ef81ffe1b601472218..4012eb7f9a723a27ddf42615eec5d4c27e1e2534:/app/views/site/index.rhtml diff --git a/app/views/site/index.rhtml b/app/views/site/index.rhtml index 1fe1dccd7..31b8fcd70 100644 --- a/app/views/site/index.rhtml +++ b/app/views/site/index.rhtml @@ -1,11 +1,11 @@
- <%= start_form_tag :controller => 'geocoder', :action => 'search' %> + <% form_tag :controller => 'geocoder', :action => 'search' do %> <%= text_field 'query', 'postcode' %> <%= text_field 'query', 'place_name'%> <%= submit_tag 'Search' %> - <%= end_form_tag %> + <% end %>
Geolocation provided by npemap.org.uk, @@ -128,14 +128,8 @@ var el = document.getElementById( 'map' ); var left = getStyle( el, 'left' ); var top = getStyle( el, 'top' ); - var bottom = el.old_bottom; - if( ! bottom ) { - bottom = getStyle( el, 'bottom' ); - } - var right = el.old_right; - if( ! right ) { - right = getStyle( el, 'right' ); - } + var bottom = getStyle( el, 'bottom' ); + var right = getStyle( el, 'right' ); var width = el.old_width; if( ! width ) { width = getStyle( el, 'width' ); @@ -168,9 +162,14 @@ } if( top != 'auto' && bottom != 'auto' && height == 'auto' ) { el.old_height = height; - var new_height = (pheight - el.offsetHeight - parseInt( bottom ) ); + var new_height = (pheight - el.offsetTop - parseInt( bottom ) ); el.style.height = new_height + 'px'; } + map.updateSize(); + el.style.display = 'none'; + setTimeout( function() { + el.style.display = ''; + }, 200 ); } if( ie6 ) {