focus search box if there is no search yet

This commit is contained in:
joshua stein 2012-07-11 17:41:51 -05:00
parent f7fcd843a7
commit bc0d934d5e

View file

@ -43,6 +43,14 @@
<label for="search_order_points" class="normal">Points</label>
</div>
<% end %>
<% if !@search.q.present? %>
<script>
$(document).ready(function() {
$("#q").focus();
});
</script>
<% end %>
</div>
<% if @search.results.any? %>