focus search box if there is no search yet
This commit is contained in:
parent
f7fcd843a7
commit
bc0d934d5e
|
@ -43,6 +43,14 @@
|
||||||
<label for="search_order_points" class="normal">Points</label>
|
<label for="search_order_points" class="normal">Points</label>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% if !@search.q.present? %>
|
||||||
|
<script>
|
||||||
|
$(document).ready(function() {
|
||||||
|
$("#q").focus();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<% if @search.results.any? %>
|
<% if @search.results.any? %>
|
||||||
|
|
Loading…
Reference in a new issue