Prevent search from displaying local history
parent
4d4662f509
commit
facc1f4d35
|
@ -1,16 +1,20 @@
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
$('#search-input').focus();
|
//$('input:text').focus();
|
||||||
|
|
||||||
$('#search-input').keypress(function (e) {
|
$('input:text').keypress(function (e) {
|
||||||
if (e.which == 13) {
|
if (e.which == 13) {
|
||||||
|
var term = $('input:text').val();
|
||||||
|
$('input[name="term"]').val(term);
|
||||||
$('#search-form').submit();
|
$('#search-form').submit();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#search-button').click(function (e) {
|
$('#search-button').click(function (e) {
|
||||||
|
var term = $('input:text').val();
|
||||||
|
$('input[name="term"]').val(term);
|
||||||
$('#search-form').submit();
|
$('#search-form').submit();
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,9 +22,11 @@
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<form method="post" action="{% url 'home' %}" id="search-form">{% csrf_token %}
|
<form method="post" action="{% url 'home' %}" id="search-form">{% csrf_token %}
|
||||||
<div class="input-group">
|
<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"
|
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">
|
<div class="input-group-addon">
|
||||||
<a href="#" id="search-button">
|
<a href="#" id="search-button">
|
||||||
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
|
||||||
|
|
Loading…
Reference in New Issue