$("#search_form").submit(function (e) {
e.preventDefault();
- $("#sidebar_title").html(I18n.t('site.sidebar.search_results'));
$("#sidebar_content").load($(this).attr("action"), {
query: $("#query").val()
- }, openSidebar);
+ });
});
$("#describe_location").click(function (e) {
var mapParams = OSM.mapParams();
- $("#sidebar_title").html(I18n.t('site.sidebar.search_results'));
$("#sidebar_content").load($(this).attr("href"), {
lat: mapParams.lat,
lon: mapParams.lon,
zoom: mapParams.zoom
- }, openSidebar);
+ });
});
});
map.dataLayer = new L.OSM.DataLayer(null);
map.dataLayer.options.code = 'D';
- $("#sidebar").on("opened closed", function () {
- map.invalidateSize();
- });
-
var position = $('html').attr('dir') === 'rtl' ? 'topleft' : 'topright';
L.OSM.zoom({position: position})
locationFilter.on("change", getData);
- $("#sidebar_title").html(I18n.t('browse.start_rjs.data_frame_title'));
$("#sidebar_content").html(sidebarHtml);
- openSidebar();
-
if (browseObjectList) loadObjectList();
map.on("moveend", updateData);
adjustButton: false
}).addTo(map);
+ update();
+
locationFilter.on("change", update);
map.on("moveend", update);
- $("#sidebar_title").html(I18n.t('export.start_rjs.export'));
-
$("#maxlat,#minlon,#maxlon,#minlat").change(boundsChanged);
$("#drag_box").click(enableFilter);
- openSidebar();
-
setBounds(map.getBounds());
$("#sidebar").one("closed", function () {
var bounds = map.getBounds();
- $("#sidebar_title").html(I18n.t('site.sidebar.search_results'));
$("#sidebar_content").load($(this).attr("action"), {
query: $("#query").val(),
zoom: map.getZoom(),
maxlat: bounds.getNorth()
});
- openSidebar();
-
$("#sidebar").one("closed", function () {
map.removeLayer(marker);
map.removeObject();
var center = map.getCenter(),
zoom = map.getZoom();
- $("#sidebar_title").html(I18n.t('site.sidebar.search_results'));
$("#sidebar_content").load($(this).attr("href"), {
lat: center.lat,
lon: center.lng,
zoom: zoom
- }, openSidebar);
+ });
}
}
-function openSidebar() {
- $("#sidebar-main")
- .hide();
-
- $("#sidebar")
- .trigger("closed")
- .show()
- .trigger("opened");
-}
-
function closeSidebar() {
$("#sidebar")
- .hide()
.trigger("closed");
-
- $("#sidebar-main")
- .show();
}
$(document).ready(function () {
+<h2><%= t 'browse.start_rjs.data_frame_title' %></h2>
<div id="browse_controls" class='inner12'>
<a id="browse_filter_toggle" class="button" href="#"><%= t'browse.start_rjs.manually_select' %></a>
<a id="browse_hide_areas_box" class="button" href="#"><%= t'browse.start_rjs.hide_areas' %></a>
+<h2><%= t('site.sidebar.search_results') %></h2>
<% @sources.each do |source| %>
<h4><%= raw(t "geocoder.search.title.#{source}") %></h4>
<div class="search_results_entry" id="<%= "search_#{source}" %>">
<% end %>
<% content_for :sidebar do %>
+ <h2><%= t 'export.start_rjs.export' %></h2>
<%= form_tag :controller => "export", :action => "finish" do %>
<%= hidden_field_tag 'format', 'osm' %>
- <div class="export_bounds inner12">
+ <div class="export_bounds inner22">
<div class='export_area_inputs'>
<%= text_field_tag('maxlat', nil, :size => 10, :class => "export_bound") %>
<br/>
<div id="export_osm">
<h4><%= t'export.start.licence' %></h4>
- <div class="export_details inner12">
+ <div class="export_details">
<p><%= raw t'export.start.export_details' %></p>
</div>
<div id="export_osm_too_large">
<h4><%= t'export.start.too_large.heading' %></h4>
- <div class="export_details inner12">
+ <div class="export_details">
<p><%= t'export.start.too_large.body' %></p>
<dl>
<dt><a href="http://planet.openstreetmap.org/"><%= t'export.start.too_large.planet.title' %></a></dt>
</div>
</div>
- <div class="inner12">
+ <div class="inner22">
<%= submit_tag t('export.start.export_button'), :id => "export_commit" %>
</div>
<% end %>