Restore the duplicate search form in the header
It turns out the duplicate form is used, for the the mobile view.
This commit is contained in:
parent
6ff6b2f527
commit
dd12e1de63
3 changed files with 7 additions and 3 deletions
|
@ -229,7 +229,7 @@ $(document).ready(function () {
|
|||
|
||||
page.load = function() {
|
||||
if (!("autofocus" in document.createElement("input"))) {
|
||||
$(".search_form input[name=query]").focus();
|
||||
$("#sidebar .search_form input[name=query]").focus();
|
||||
}
|
||||
return map.getState();
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%= form_tag search_path, :class => "search_form" do %>
|
||||
<%= submit_tag t('site.search.submit_text') %>
|
||||
<div class='query_wrapper'>
|
||||
<input type="text" name="query" value="<%= params[:query] %>" placeholder="<%= t('site.search.search') %>" autofocus>
|
||||
<%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus %>
|
||||
<%= link_to t('site.search.where_am_i'), '#', { :class => "describe_location", :title => t('site.search.where_am_i_title') } %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
@ -16,9 +16,13 @@
|
|||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header do %>
|
||||
<%= render :partial => "layouts/search", :locals => { :autofocus => false } %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :content do %>
|
||||
<div id="sidebar">
|
||||
<%= render :partial => "layouts/search" %>
|
||||
<%= render :partial => "layouts/search", :locals => { :autofocus => true } %>
|
||||
|
||||
<% if STATUS == :database_offline or STATUS == :api_offline %>
|
||||
<p class="error"><%= t 'layouts.osm_offline' %></p>
|
||||
|
|
Loading…
Add table
Reference in a new issue