Prevent search from displaying local history
parent
4d4662f509
commit
facc1f4d35
|
@ -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;
|
||||
});
|
||||
|
|
|
@ -22,9 +22,11 @@
|
|||
<div class="col-md-12">
|
||||
<form method="post" action="{% url 'home' %}" id="search-form">{% csrf_token %}
|
||||
<div class="input-group">
|
||||
<input type="text" name="term" list="satellites-list" id="search-input"
|
||||
<input type="text" list="satellites-list"
|
||||
class="form-control input-lg satellite-search"
|
||||
placeholder="Select Satellite (Type NORAD Cat ID or Name)" autocomplete="off">
|
||||
placeholder="Select Satellite (Type NORAD Cat ID or Name)"
|
||||
{% if not satellite %}autofocus{% endif %}>
|
||||
<input type="hidden" name="term" name="term" id="search-term">
|
||||
<div class="input-group-addon">
|
||||
<a href="#" id="search-button">
|
||||
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
|
||||
|
|
Loading…
Reference in New Issue