diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-10-13 13:04:31 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-10-13 13:04:31 +0800 |
commit | 9d22330effa8d433ec39edc37ca4e3a1e3206b85 (patch) | |
tree | 3a9017cb0b48ecb5bbc7212f8c88cf6053fbaa0f /templates | |
parent | df1abefaaa678cedc4ce0293fd84bb4164c9852d (diff) | |
download | patchwork-9d22330effa8d433ec39edc37ca4e3a1e3206b85.tar patchwork-9d22330effa8d433ec39edc37ca4e3a1e3206b85.tar.gz |
views/base: Implement limit for submitter autocompletion
Add a limit parameter to the completion view, and pass a limit of 20
results in the javascript.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/patchwork/filters.html | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/patchwork/filters.html b/templates/patchwork/filters.html index 3698101..c0b8f5a 100644 --- a/templates/patchwork/filters.html +++ b/templates/patchwork/filters.html @@ -122,6 +122,7 @@ function submitter_complete_response() function submitter_field_change(field) { + var limit = 20; var value = field.value; if (value.length < 4) { return; @@ -131,7 +132,8 @@ function submitter_field_change(field) return; } - var url = '{% url patchwork.views.submitter_complete %}?q=' + value; + var url = '{% url patchwork.views.submitter_complete %}?q=' + value + + '&l=' + limit; req = new XMLHttpRequest(); req.onreadystatechange = submitter_complete_response; req.open("GET", url, true); |