diff --git a/static/js/register.js b/static/js/register.js index 4063c1d..21bb13b 100644 --- a/static/js/register.js +++ b/static/js/register.js @@ -21,7 +21,8 @@ $(document).ready(function() { }); } function filter_customers(typed) { - /* FIXME: Does not work well. */ + /* FIXME: Does not work. */ + console.log(typed); setTimeout(function() { $("li.customer").each(function(i) { if($(this).children("span.name").text().indexOf(typed) == -1) { @@ -38,8 +39,8 @@ $(document).ready(function() { }, 50); } /* Customer search */ - $('.typeahead').typeahead(); - $('#id_customer_name').keydown(function(event) { + //$('.typeahead').typeahead(); + $('#id_customer_typeahead').keyup(function(event) { filter_customers(event.srcElement.value); }); /* Customer selection */ diff --git a/templates/register.html b/templates/register.html index 669ca54..2d10838 100644 --- a/templates/register.html +++ b/templates/register.html @@ -87,7 +87,7 @@ {% endblock %} {% block tailinc %} - + {% endblock %}