summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2007-08-10 08:35:55 +0100
committerAndrew Dolgov <[email protected]>2007-08-10 08:35:55 +0100
commit05fcdf52b292b7da75b6b12156dbc4ba678349e3 (patch)
tree6f07450f372b7b90834de7d7623bbf3db7637105 /modules
parentd84f95234a1825fadc25e35c78492bf7b9838393 (diff)
tag editor: autocomplete
Diffstat (limited to 'modules')
-rw-r--r--modules/backend-rpc.php17
-rw-r--r--modules/popup-dialog.php12
2 files changed, 25 insertions, 4 deletions
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 "<ul>";
+ while ($line = db_fetch_assoc($result)) {
+ print "<li>" . $line["tag_name"] . "</li>";
+ }
+ print "</ul>";
+
+ }
+
}
?>
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 "<tr><td colspan='2'><input type=\"hidden\" name=\"id\" value=\"$param\"></td></tr>";
- print "<tr><td colspan='2'><textarea rows='4' class='iedit' name='tags_str'>$tags_str</textarea></td></tr>";
+ print "<tr><td colspan='2'><textarea rows='4' class='iedit' id='tags_str'
+ name='tags_str'>$tags_str</textarea>
+ <div class=\"autocomplete\" id=\"tags_choices\"
+ style=\"display:none\"></div>
+ </td></tr>";
- print "<tr><td>".__('Add existing tag:')."</td>";
+/* print "<tr><td>".__('Add existing tag:')."</td>";
$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 "</td>";
+ print "</td>";
- print "</tr>";
+ print "</tr>"; */
print "</table>";