]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'jfirebaugh/562'
authorTom Hughes <tom@compton.nu>
Tue, 3 Dec 2013 00:23:16 +0000 (00:23 +0000)
committerTom Hughes <tom@compton.nu>
Tue, 3 Dec 2013 00:23:16 +0000 (00:23 +0000)
app/assets/javascripts/index/search.js
app/assets/stylesheets/browse.css.scss
app/assets/stylesheets/common.css.scss
app/helpers/geocoder_helper.rb

index c1c95a3e43aee61ce1698ee2dd3706d82f21e7ae..6b6f3231f2b0f3fca684e3d4a93ecf7931c2d449 100644 (file)
@@ -30,11 +30,16 @@ OSM.Search = function(map) {
       center = L.latLng(data.lat, data.lon);
 
     if (data.minLon && data.minLat && data.maxLon && data.maxLat) {
-      map.fitBounds([[data.minLat, data.minLon],
-        [data.maxLat, data.maxLon]]);
+      map.fitBounds([[data.minLat, data.minLon], [data.maxLat, data.maxLon]]);
     } else {
       map.setView(center, data.zoom);
     }
+
+    // Let clicks to object browser links propagate.
+    if (data.type && data.id) return;
+
+    e.preventDefault();
+    e.stopPropagation();
   }
 
   var marker = L.marker([0, 0], {icon: getUserIcon()});
index ff9dad9b4a5f2987018831b26dfda6ed55e680e1..0aa762a12c2150a3132aad594bc89117c149b98e 100644 (file)
@@ -5,6 +5,11 @@
 .relation::before {
   display: inline-block;
   width: 25px;
+  margin-left: -25px;
+}
+
+.node, .way, .relation {
+  margin-left: 25px;
 }
 
 /* Deleted objects */
index d16cf12d453c476a6bd85e665eb1857836e00c47..320413f785a02f8e8b14a44caa441f14bd848526 100644 (file)
@@ -1084,6 +1084,7 @@ header .search_form {
       width: 50%;
       float: left;
       padding: 6px 10px;
+      word-wrap: break-word;
     }
 
     .browse-tag-k {
index ce6c7eafa71f68065872e116fd1906827726437f..04f437a7c47b4592729f843254a570b0ffa89901 100644 (file)
@@ -5,9 +5,9 @@ module GeocoderHelper
     if result[:type] and result[:id]
       url = url_for(:controller => :browse, :action => result[:type], :id => result[:id])
     elsif result[:min_lon] and result[:min_lat] and result[:max_lon] and result[:max_lat]
-      url = "?minlon=#{result[:min_lon]}&minlat=#{result[:min_lat]}&maxlon=#{result[:max_lon]}&maxlat=#{result[:max_lat]}"
+      url = "/?bbox=#{result[:min_lon]},#{result[:min_lat]},#{result[:max_lon]},#{result[:max_lat]}"
     else
-      url = "?mlat=#{result[:lat]}&mlon=#{result[:lon]}&zoom=#{result[:zoom]}"
+      url = "/#map=#{result[:zoom]}/#{result[:lat]}/#{result[:lon]}"
     end
 
     result.each do |key,value|