Extract browse.js static asset

This commit is contained in:
John Firebaugh 2012-08-25 19:27:10 -07:00 committed by Tom Hughes
parent 2feff4244f
commit 17b23b0756
8 changed files with 9 additions and 10 deletions

View file

@ -542,5 +542,3 @@ function clearStatus() {
$("#browse_status").html("");
$("#browse_status").hide();
}
startBrowse("<%=j render :partial => "sidebar" %>");

View file

@ -2,8 +2,10 @@
//= require jquery_ujs
//= require jquery.autogrowtextarea
//= require jquery.timers
//= require openlayers
//= require i18n/translations
//= require globals
//= require browse
//= require export
/*

View file

@ -7,6 +7,7 @@ class BrowseController < ApplicationController
around_filter :web_timeout, :except => [:start]
def start
render :partial => "sidebar"
end
def relation

View file

@ -1,4 +1,3 @@
<%= javascript_include_tag 'openlayers.js' %>
<%= javascript_include_tag 'map.js' %>
<iframe id="linkloader" style="display: none">

View file

@ -1,4 +1,3 @@
<%= javascript_include_tag 'openlayers.js' %>
<%= javascript_include_tag 'map.js' %>
<div id="changeset_list_map">

View file

@ -49,7 +49,6 @@
<% zoom = '12' %>
<% end %>
<%= javascript_include_tag 'openlayers.js' %>
<%= javascript_include_tag 'map.js' %>
<script type="text/javascript">

View 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,7 +125,6 @@ else
end
%>
<%= javascript_include_tag 'openlayers.js' %>
<%= javascript_include_tag 'map.js' %>
<%= render :partial => 'resize' %>
@ -192,8 +191,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 () {

View file

@ -13,7 +13,6 @@ else
end
%>
<%= javascript_include_tag 'openlayers.js' %>
<%= javascript_include_tag 'map.js' %>
<script type="text/javascript">