diff options
| author | 2011-03-17 08:46:15 +0100 | |
|---|---|---|
| committer | 2011-03-17 08:46:15 +0100 | |
| commit | 8146646a0e1c7535e62aeebab049f7b1740c86ae (patch) | |
| tree | 024e72fef24db07cc8287affd6b47d6c2a255b05 /www/ajax | |
| parent | 6e46a9329e9d6f7d86ca66725efd79c0f21dbe83 (diff) | |
| download | scuttle-8146646a0e1c7535e62aeebab049f7b1740c86ae.tar.gz scuttle-8146646a0e1c7535e62aeebab049f7b1740c86ae.zip | |
prepare jquery autocomplete (does not work yet)
Diffstat (limited to 'www/ajax')
| -rw-r--r-- | www/ajax/getcontacttags.php | 20 |
1 files changed, 11 insertions, 9 deletions
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,17 +27,19 @@ 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'], + ); +} -{identifier:"tag", -items: [ -<?php - $listTags = $b2tservice->getContactTags($userservice->getCurrentUserId(), 1000, $userservice->getCurrentUserId()); - foreach($listTags as $t) { - echo "{tag: \"".$t['tag']."\"},"; - } +echo json_encode($tags); ?> -]} |