From 8146646a0e1c7535e62aeebab049f7b1740c86ae Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 17 Mar 2011 08:46:15 +0100 Subject: prepare jquery autocomplete (does not work yet) --- www/ajax/getcontacttags.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'www/ajax') diff --git a/www/ajax/getcontacttags.php b/www/ajax/getcontacttags.php index 89d6a3a..5f1edb3 100644 --- a/www/ajax/getcontacttags.php +++ b/www/ajax/getcontacttags.php @@ -27,18 +27,20 @@ require_once '../www-header.php'; $b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag'); $bookmarkservice =SemanticScuttle_Service_Factory::get('Tag'); +$listTags = $b2tservice->getContactTags( + $userservice->getCurrentUserId(), 1000, $userservice->getCurrentUserId() +); +$tags = array(); +foreach($listTags as $t) { + $tags[] = array( + 'caption' => $t['tag'], + 'value' => $t['tag'], + ); +} + +echo json_encode($tags); ?> -{identifier:"tag", -items: [ -getContactTags($userservice->getCurrentUserId(), 1000, $userservice->getCurrentUserId()); - foreach($listTags as $t) { - echo "{tag: \"".$t['tag']."\"},"; - } -?> -]} - -- cgit v1.2.3-54-g00ecf