From 05fcdf52b292b7da75b6b12156dbc4ba678349e3 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 10 Aug 2007 08:35:55 +0100 Subject: tag editor: autocomplete --- modules/backend-rpc.php | 17 +++++++++++++++++ modules/popup-dialog.php | 12 ++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/backend-rpc.php b/modules/backend-rpc.php index 7e83e816a..3303b25f9 100644 --- a/modules/backend-rpc.php +++ b/modules/backend-rpc.php @@ -320,5 +320,22 @@ print_error_xml(6); } + if ($subop == "completeTags") { + + $search = db_escape_string($_REQUEST["search"]); + + $result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags + WHERE owner_uid = '".$_SESSION["uid"]."' AND + tag_name LIKE '$search%' ORDER BY tag_name + LIMIT 10"); + + print ""; + + } + } ?> diff --git a/modules/popup-dialog.php b/modules/popup-dialog.php index 6590159d2..2805f7653 100644 --- a/modules/popup-dialog.php +++ b/modules/popup-dialog.php @@ -376,9 +376,13 @@ print ""; - print ""; + print " +
+ "; - print "".__('Add existing tag:').""; +/* print "".__('Add existing tag:').""; $result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY tag_name"); @@ -395,9 +399,9 @@ print_select("found_tags", '', $found_tags, "onchange=\"javascript:editTagsInsert()\""); - print ""; + print ""; - print ""; + print ""; */ print ""; -- cgit v1.2.3