]> git.openstreetmap.org Git - rails.git/commitdiff
Making sure all the "nearest" mappers are displayed instead of just one.
authorJohn McKerrell <john@mckerrell.net>
Tue, 8 May 2007 08:38:12 +0000 (08:38 +0000)
committerJohn McKerrell <john@mckerrell.net>
Tue, 8 May 2007 08:38:12 +0000 (08:38 +0000)
Fixing the styling of the popup to retain its rounded edges.

app/views/user/account.rhtml
public/stylesheets/site.css

index f4af984e92c99bccd01c2e1f3e46dde137d22ce3..6ae0b5c7b525fd9fe0518b1aca06da9430a0824f 100644 (file)
@@ -35,7 +35,7 @@
     <th>Contact</th>
     </tr>
     <% @user.nearby(1,1).each do |nearby| %>
-    <% nearest_str = "nearest.push( { 'display_name' : '#{nearby.display_name}', 'home_lat' : #{nearby.home_lat}, 'home_lon' : #{nearby.home_lon} } )" %>
+    <% nearest_str += "nearest.push( { 'display_name' : '#{nearby.display_name}', 'home_lat' : #{nearby.home_lat}, 'home_lon' : #{nearby.home_lon} } );\n" %>
 
     <tr>
     <td><%= link_to nearby.display_name, :controller => 'user', :action => 'view',  :display_name => nearby.display_name %></td>
     near_icon.url = OpenLayers.Util.getImagesLocation() + "marker-green.png";;
     var i = nearest.length;
     while( i-- ) {
-        var nearmarker = new OpenLayers.Marker( lonlat2mercator( new OpenLayers.LonLat( nearest[i].home_lon, nearest[i].home_lat ) ), near_icon );
+        var nearmarker = new OpenLayers.Marker( lonlat2mercator( new OpenLayers.LonLat( nearest[i].home_lon, nearest[i].home_lat ) ), near_icon.clone() );
         markers.addMarker( nearmarker );
         nearmarker.events.register("click", "nearmarker", makeMarkerFunction( i ) );
     }
index 95ea2cfa10ee740936910836f8ad0ca2f22d8ae9..4dbc06f54b2a5dca59946a80e3951860e76f5c0c 100644 (file)
@@ -470,7 +470,7 @@ input {
     padding : 2px;\r
 }\r
 \r
-#popup * {\r
+#popup p, #popup span {\r
     background-color : #E3FFC5 !important;\r
 }\r
 \r