diff --git a/db/static/js/app.js b/db/static/js/app.js index 21e725b..8a7bbe7 100644 --- a/db/static/js/app.js +++ b/db/static/js/app.js @@ -1,16 +1,20 @@ $(document).ready(function() { 'use strict'; - $('#search-input').focus(); + //$('input:text').focus(); - $('#search-input').keypress(function (e) { + $('input:text').keypress(function (e) { if (e.which == 13) { + var term = $('input:text').val(); + $('input[name="term"]').val(term); $('#search-form').submit(); return false; } }); $('#search-button').click(function (e) { + var term = $('input:text').val(); + $('input[name="term"]').val(term); $('#search-form').submit(); return false; }); diff --git a/db/templates/base/home.html b/db/templates/base/home.html index ee20af6..945ba7f 100644 --- a/db/templates/base/home.html +++ b/db/templates/base/home.html @@ -22,9 +22,11 @@
{% csrf_token %}
- + placeholder="Select Satellite (Type NORAD Cat ID or Name)" + {% if not satellite %}autofocus{% endif %}> +