From fed4cd3891c64106a56647a5ccaa1bdee2912850 Mon Sep 17 00:00:00 2001 From: Luke Faraone Date: Wed, 19 Sep 2012 13:10:09 -0400 Subject: [PATCH] =?UTF-8?q?Limit=20=E2=84=96=20of=20autocomplete=20results?= =?UTF-8?q?=20so=20the=20list=20doesn't=20fall=20off=20the=20screen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (imported from commit 311376c1dec35a16ddfb66fc01161501c2eafff0) --- zephyr/static/js/zephyr.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index 554bd8666d..3d945f4627 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -608,14 +608,18 @@ function update_autocomplete() { instance_list.sort(); people_list.sort(); + // limit number of items so the list doesn't fall off the screen $( "#class" ).typeahead({ - source: class_list + source: class_list, + items: 3, }); $( "#instance" ).typeahead({ - source: instance_list + source: instance_list, + items: 2, }); $( "#recipient" ).typeahead({ - source: people_list + source: people_list, + items: 4, }); }