Commit a9dcd2e683200f96b88c092b0a46ae40b3fdaa83

Authored by Rafael Martins
1 parent bf622985

Fix for the map search not showing the products correctly

app/views/search/_google_maps.rhtml
... ... @@ -3,28 +3,20 @@
3 3 <div id="map"></div>
4 4 </div>
5 5  
6   -<%= content_tag('script', '', :src => GoogleMaps.api_url(environment.default_hostname), :type => 'text/javascript') %>
  6 +<%= content_tag('script', '', :src => "http://maps.google.com/maps/api/js?sensor=true", :type => 'text/javascript') %>
7 7 <%= javascript_include_tag('google_maps') %>
8 8  
9 9 <%
10 10 icon = default_or_themed_icon("/images/icons-map/enterprise.png")
11   - icon_shadow = default_or_themed_icon("/images/icons-map/enterprise_shadow.png")
12 11 %>
13 12  
14 13 <script type='text/javascript'>
15 14 mapLoad(<%= GoogleMaps.initial_zoom.to_json %>);
16 15  
17   - mapBaseIcon = new GIcon();
18   - mapBaseIcon.iconSize=new GSize(32,32);
19   - mapBaseIcon.shadowSize=new GSize(36,32);
20   - mapBaseIcon.iconAnchor=new GPoint(16,32);
21   - mapBaseIcon.infoWindowAnchor=new GPoint(16,0);
22   - icon = new GIcon(mapBaseIcon, "<%= icon %>", null, "<%= icon_shadow %>");
23   -
24 16 <% @results.each do |name,results| %>
25 17 <% results.each do |item| %>
26 18 <% if item.lat && item.lng %>
27   - mapPutMarker(<%= item.lat.to_json %>, <%= item.lng.to_json %>, <%= item.name.to_json %>, icon,
  19 + mapPutMarker(<%= item.lat.to_json %>, <%= item.lng.to_json %>, <%= item.name.to_json %>, '<%= icon %>',
28 20 '<%= url_for(:controller => :map_balloon, :action => name.to_s.singularize, :id => item.id) %>');
29 21 <% end %>
30 22 <% end %>
... ...
app/views/search/_product.rhtml
... ... @@ -3,7 +3,7 @@
3 3  
4 4 <li class="search-product-item">
5 5 <div class="search-product-item-first-column">
6   - <%= render :partial => 'image', :object => product %>
  6 + <%= render :partial => 'search/image', :object => product %>
7 7  
8 8 <% if product.available %>
9 9 <% if product.price && product.price > 0 %>
... ...