]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/index.html.erb
Use a standard application.js bundle
[rails.git] / app / views / site / index.html.erb
index 5eb8ae228c3a3b4b53b743d4a3df22bc0279a8de..dc0e02f6faf747ec5397349b433b1f14554d9a90 100644 (file)
@@ -6,7 +6,7 @@
 
 <% unless STATUS == :api_offline or STATUS == :database_offline -%>
   <% content_for :editmenu do -%>
-    <li><%= link_to t("browse.start_rjs.data_layer_name"), "#", :id => "show_data" %></li>
+    <li><%= link_to t("browse.start_rjs.data_layer_name"), { :controller => :browse, :action => :start }, :id => "show_data" %></li>
   <% end -%>
 <% end -%>
 
@@ -125,9 +125,6 @@ else
 end
 %>
 
-<%= javascript_include_tag 'openlayers.js' %>
-<%= javascript_include_tag 'map.js' %>
-
 <%= render :partial => 'resize' %>
 
 <script type="text/javascript">
@@ -192,8 +189,11 @@ end
   }
 
   $(document).ready(function () {
-    $("#show_data").click(function () {
-      $.ajax({ url: "<%= url_for :controller => :browse, :action => :start %>" });
+    $("#show_data").click(function (e) {
+      $.ajax({ url: $(this).attr('href'), success: function (sidebarHtml) {
+        startBrowse(sidebarHtml);
+      }});
+      e.preventDefault();
     });
 
     $("body").on("click", "a.set_position", function () {