]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
work around minLength problem in jquery-ui-autocomplete
authorChristian Weiske <cweiske@cweiske.de>
Tue, 29 Mar 2011 06:05:15 +0000 (08:05 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 29 Mar 2011 06:05:15 +0000 (08:05 +0200)
data/templates/editbookmark.tpl.php

index 69d3897831d9f8f4a0b6bb855cddcd485f82bea2..1783692949d9a8e9884e691f8f2547249d5aa2a5 100644 (file)
@@ -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
                 )
             );