Filtering av users
This commit is contained in:
1 parent
368228e5fa
commit
3e11ea9b75
2 files changed
+5
-4
No files matched your search
@@ -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 */
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
</section>
|
||||
{% endblock %}
|
||||
{% block tailinc %}
|
||||
<script src="{{ STATIC_URL }}js/bootstrap-typeahead.js"></script>
|
||||
<!--<script src="{{ STATIC_URL }}js/bootstrap-typeahead.js"></script>-->
|
||||
<script src="{{ STATIC_URL }}js/bootstrap-tooltip.js"></script>
|
||||
<script src="{{ STATIC_URL }}js/register.js"></script>
|
||||
{% endblock %}
|
||||
Reference in new issue
Block a user