]> git.openstreetmap.org Git - rails.git/commitdiff
Serve OpenLayers through the asset pipeline
authorTom Hughes <tom@compton.nu>
Fri, 25 Nov 2011 20:07:50 +0000 (20:07 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 25 Nov 2011 20:07:50 +0000 (20:07 +0000)
73 files changed:
app/assets/javascripts/openlayers.js [new file with mode: 0644]
app/views/browse/_map.html.erb
app/views/changeset/_map.html.erb
app/views/diary_entry/edit.html.erb
app/views/site/index.html.erb
app/views/user/_map.html.erb
vendor/assets/openlayers/OpenLayers.js [moved from public/openlayers/OpenLayers.js with 100% similarity]
vendor/assets/openlayers/OpenStreetMap.js [moved from public/openlayers/OpenStreetMap.js with 100% similarity]
vendor/assets/openlayers/img/404.png [moved from public/openlayers/img/404.png with 100% similarity]
vendor/assets/openlayers/img/blank.gif [moved from public/openlayers/img/blank.gif with 100% similarity]
vendor/assets/openlayers/img/cloud-popup-relative.png [moved from public/openlayers/img/cloud-popup-relative.png with 100% similarity]
vendor/assets/openlayers/img/drag-rectangle-off.png [moved from public/openlayers/img/drag-rectangle-off.png with 100% similarity]
vendor/assets/openlayers/img/drag-rectangle-on.png [moved from public/openlayers/img/drag-rectangle-on.png with 100% similarity]
vendor/assets/openlayers/img/east-mini.png [moved from public/openlayers/img/east-mini.png with 100% similarity]
vendor/assets/openlayers/img/layer-switcher-maximize.png [moved from public/openlayers/img/layer-switcher-maximize.png with 100% similarity]
vendor/assets/openlayers/img/layer-switcher-minimize.png [moved from public/openlayers/img/layer-switcher-minimize.png with 100% similarity]
vendor/assets/openlayers/img/marker-blue.png [moved from public/openlayers/img/marker-blue.png with 100% similarity]
vendor/assets/openlayers/img/marker-gold.png [moved from public/openlayers/img/marker-gold.png with 100% similarity]
vendor/assets/openlayers/img/marker-green.png [moved from public/openlayers/img/marker-green.png with 100% similarity]
vendor/assets/openlayers/img/marker.png [moved from public/openlayers/img/marker.png with 100% similarity]
vendor/assets/openlayers/img/measuring-stick-off.png [moved from public/openlayers/img/measuring-stick-off.png with 100% similarity]
vendor/assets/openlayers/img/measuring-stick-on.png [moved from public/openlayers/img/measuring-stick-on.png with 100% similarity]
vendor/assets/openlayers/img/north-mini.png [moved from public/openlayers/img/north-mini.png with 100% similarity]
vendor/assets/openlayers/img/panning-hand-off.png [moved from public/openlayers/img/panning-hand-off.png with 100% similarity]
vendor/assets/openlayers/img/panning-hand-on.png [moved from public/openlayers/img/panning-hand-on.png with 100% similarity]
vendor/assets/openlayers/img/slider.png [moved from public/openlayers/img/slider.png with 100% similarity]
vendor/assets/openlayers/img/south-mini.png [moved from public/openlayers/img/south-mini.png with 100% similarity]
vendor/assets/openlayers/img/west-mini.png [moved from public/openlayers/img/west-mini.png with 100% similarity]
vendor/assets/openlayers/img/zoom-minus-mini.png [moved from public/openlayers/img/zoom-minus-mini.png with 100% similarity]
vendor/assets/openlayers/img/zoom-plus-mini.png [moved from public/openlayers/img/zoom-plus-mini.png with 100% similarity]
vendor/assets/openlayers/img/zoom-world-mini.png [moved from public/openlayers/img/zoom-world-mini.png with 100% similarity]
vendor/assets/openlayers/img/zoombar.png [moved from public/openlayers/img/zoombar.png with 100% similarity]
vendor/assets/openlayers/theme/default/framedCloud.css [moved from public/openlayers/theme/default/framedCloud.css with 100% similarity]
vendor/assets/openlayers/theme/default/google.css [moved from public/openlayers/theme/default/google.css with 100% similarity]
vendor/assets/openlayers/theme/default/google.tidy.css [moved from public/openlayers/theme/default/google.tidy.css with 100% similarity]
vendor/assets/openlayers/theme/default/ie6-style.css [moved from public/openlayers/theme/default/ie6-style.css with 100% similarity]
vendor/assets/openlayers/theme/default/ie6-style.tidy.css [moved from public/openlayers/theme/default/ie6-style.tidy.css with 100% similarity]
vendor/assets/openlayers/theme/default/img/add_point_off.png [moved from public/openlayers/theme/default/img/add_point_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/add_point_on.png [moved from public/openlayers/theme/default/img/add_point_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/blank.gif [moved from public/openlayers/theme/default/img/blank.gif with 100% similarity]
vendor/assets/openlayers/theme/default/img/close.gif [moved from public/openlayers/theme/default/img/close.gif with 100% similarity]
vendor/assets/openlayers/theme/default/img/drag-rectangle-off.png [moved from public/openlayers/theme/default/img/drag-rectangle-off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/drag-rectangle-on.png [moved from public/openlayers/theme/default/img/drag-rectangle-on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/draw_line_off.png [moved from public/openlayers/theme/default/img/draw_line_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/draw_line_on.png [moved from public/openlayers/theme/default/img/draw_line_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/draw_point_off.png [moved from public/openlayers/theme/default/img/draw_point_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/draw_point_on.png [moved from public/openlayers/theme/default/img/draw_point_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/draw_polygon_off.png [moved from public/openlayers/theme/default/img/draw_polygon_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/draw_polygon_on.png [moved from public/openlayers/theme/default/img/draw_polygon_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/editing_tool_bar.png [moved from public/openlayers/theme/default/img/editing_tool_bar.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/move_feature_off.png [moved from public/openlayers/theme/default/img/move_feature_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/move_feature_on.png [moved from public/openlayers/theme/default/img/move_feature_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/navigation_history.png [moved from public/openlayers/theme/default/img/navigation_history.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/overview_replacement.gif [moved from public/openlayers/theme/default/img/overview_replacement.gif with 100% similarity]
vendor/assets/openlayers/theme/default/img/pan-panel-NOALPHA.png [moved from public/openlayers/theme/default/img/pan-panel-NOALPHA.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/pan-panel.png [moved from public/openlayers/theme/default/img/pan-panel.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/pan_off.png [moved from public/openlayers/theme/default/img/pan_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/pan_on.png [moved from public/openlayers/theme/default/img/pan_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/panning-hand-off.png [moved from public/openlayers/theme/default/img/panning-hand-off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/panning-hand-on.png [moved from public/openlayers/theme/default/img/panning-hand-on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/remove_point_off.png [moved from public/openlayers/theme/default/img/remove_point_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/remove_point_on.png [moved from public/openlayers/theme/default/img/remove_point_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/ruler.png [moved from public/openlayers/theme/default/img/ruler.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/save_features_off.png [moved from public/openlayers/theme/default/img/save_features_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/save_features_on.png [moved from public/openlayers/theme/default/img/save_features_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/view_next_off.png [moved from public/openlayers/theme/default/img/view_next_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/view_next_on.png [moved from public/openlayers/theme/default/img/view_next_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/view_previous_off.png [moved from public/openlayers/theme/default/img/view_previous_off.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/view_previous_on.png [moved from public/openlayers/theme/default/img/view_previous_on.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/zoom-panel-NOALPHA.png [moved from public/openlayers/theme/default/img/zoom-panel-NOALPHA.png with 100% similarity]
vendor/assets/openlayers/theme/default/img/zoom-panel.png [moved from public/openlayers/theme/default/img/zoom-panel.png with 100% similarity]
vendor/assets/openlayers/theme/default/style.css [moved from public/openlayers/theme/default/style.css with 100% similarity]
vendor/assets/openlayers/theme/default/style.tidy.css [moved from public/openlayers/theme/default/style.tidy.css with 100% similarity]

diff --git a/app/assets/javascripts/openlayers.js b/app/assets/javascripts/openlayers.js
new file mode 100644 (file)
index 0000000..5cdc4f2
--- /dev/null
@@ -0,0 +1,6 @@
+//= require OpenLayers
+//= require OpenStreetMap
+
+OpenLayers._getScriptLocation = function() {
+    return "/assets/";
+};
index 4b2093e3f06ce061533fc97995145d3a3561446b..b84f7a483c9c7a7dd9fcd1a6dcb609b7ffb11ea1 100644 (file)
@@ -1,5 +1,4 @@
-<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
-<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
+<%= javascript_include_tag 'openlayers.js' %>
 <%= javascript_include_tag 'map.js' %>
 
 <iframe id="linkloader" style="display: none">
 <%= javascript_include_tag 'map.js' %>
 
 <iframe id="linkloader" style="display: none">
index 34cf7002af256c39a685ff9cd94e72d05961dcb2..bc1e795b0fa4026963e144af6125775670b0842f 100644 (file)
@@ -1,5 +1,4 @@
-<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
-<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
+<%= javascript_include_tag 'openlayers.js' %>
 <%= javascript_include_tag 'map.js' %>
 
 <div id="changeset_list_map">
 <%= javascript_include_tag 'map.js' %>
 
 <div id="changeset_list_map">
index c0a231ab2cee894de9a7daccbecbd8de20626453..8c054bb8bfc795549c2de0634eefaec176ae5a9e 100644 (file)
@@ -49,8 +49,7 @@
   <% zoom = '12' %>
 <% end %>
 
   <% zoom = '12' %>
 <% end %>
 
-<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
-<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
+<%= javascript_include_tag 'openlayers.js' %>
 <%= javascript_include_tag 'map.js' %>
 
 <script type="text/javascript">
 <%= javascript_include_tag 'map.js' %>
 
 <script type="text/javascript">
index 86eed75566eb2a55ab3d2c6d09c2a670d5b995a1..ee95bf7913aca7c938c95f4ad7b1811dfbdf866d 100644 (file)
@@ -120,8 +120,7 @@ else
 end
 %>
 
 end
 %>
 
-<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
-<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
+<%= javascript_include_tag 'openlayers.js' %>
 <%= javascript_include_tag 'map.js' %>
 
 <%= render :partial => 'resize' %>
 <%= javascript_include_tag 'map.js' %>
 
 <%= render :partial => 'resize' %>
index 6ab7139956a10854dcb9662baaa682e2dc148de3..6f192931f241dc0f1c6317069e7a17cd065950d9 100644 (file)
@@ -13,8 +13,7 @@ else
 end
 %>
 
 end
 %>
 
-<%= javascript_include_tag '/openlayers/OpenLayers.js' %>
-<%= javascript_include_tag '/openlayers/OpenStreetMap.js' %>
+<%= javascript_include_tag 'openlayers.js' %>
 <%= javascript_include_tag 'map.js' %>
 
 <script type="text/javascript">
 <%= javascript_include_tag 'map.js' %>
 
 <script type="text/javascript">