diff options
author | Christian Weiske <cweiske@cweiske.de> | 2011-03-29 08:05:15 +0200 |
---|---|---|
committer | Christian Weiske <cweiske@cweiske.de> | 2011-03-29 08:05:15 +0200 |
commit | 407daf0bfa9cbb86078d8f5497a10c80e53963ce (patch) | |
tree | fb9bea350df03a7a2cec960f5e410caa48624410 | |
parent | 24bb9eea92c6131e5b5c640c968030cf68eb3371 (diff) | |
download | semanticscuttle-407daf0bfa9cbb86078d8f5497a10c80e53963ce.tar.gz semanticscuttle-407daf0bfa9cbb86078d8f5497a10c80e53963ce.tar.bz2 |
work around minLength problem in jquery-ui-autocomplete
-rw-r--r-- | data/templates/editbookmark.tpl.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 69d3897..1783692 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -154,6 +154,10 @@ jQuery(document).ready(function() { source: function(request, response) { // delegate back to autocomplete, but extract the last term + var term = extractLast(request.term); + if (term.length < this.options.minLength) { + return; + } response( /* $.ui.autocomplete.filter( @@ -162,7 +166,7 @@ jQuery(document).ready(function() { */ $.getJSON( "<?php echo $ajaxUrl; ?>", - { beginsWith: extractLast(request.term) }, + { beginsWith: term }, response ) ); |