From 833dde3f53fe4f5101c299245d9fa02e0ae51c80 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Mon, 28 Mar 2011 19:17:51 +0200 Subject: [PATCH] jquey-autocomplete works! --- data/templates/editbookmark.tpl.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/data/templates/editbookmark.tpl.php b/data/templates/editbookmark.tpl.php index 6ce10b3..f440740 100644 --- a/data/templates/editbookmark.tpl.php +++ b/data/templates/editbookmark.tpl.php @@ -142,19 +142,21 @@ jQuery(document).ready(function() { jQuery("input#tags").autocomplete({ - minLength: 0, + minLength: 1, source: function(request, response) { // delegate back to autocomplete, but extract the last term response( + /* $.ui.autocomplete.filter( availableTags, extractLast(request.term) ) - /* - $.getJSON( "search.php", { - term: extractLast( request.term ) - }, response ); */ + $.getJSON( + "ajax/getcontacttags.php", + { beginsWith: extractLast(request.term) }, + response + ) ); },