box.style.display = "block";
}
}
+
+ /* FIXME this needs to be moved out somewhere */
+
+ if (document.getElementById("tags_choices")) {
+ new Ajax.Autocompleter('tags_str', 'tags_choices',
+ "backend.php?op=rpc&subop=completeTags",
+ { tokens: ',', paramName: "search" });
+ }
+
notify("");
} catch (e) {
exception_error("infobox_callback", e);
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>";
+
+ }
+
}
?>
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");
print_select("found_tags", '', $found_tags, "onchange=\"javascript:editTagsInsert()\"");
- print "</td>";
+ print "</td>";
- print "</tr>";
+ print "</tr>"; */
print "</table>";
border-color : #778899;
border-style : dotted;
}
+
+div.autocomplete {
+ position : absolute;
+ width : 250px;
+ background-color : white;
+ border :1px solid #778899;
+ margin : 0px;
+ padding : 0px;
+}
+
+div.autocomplete ul {
+ list-style-type : none;
+ margin : 0px;
+ padding : 0px;
+}
+
+div.autocomplete ul li.selected {
+ background-color : #fff7d5;
+}
+
+div.autocomplete ul li {
+ list-style-type : none;
+ display : block;
+ margin : 0;
+ padding : 2px;
+ height : 32px;
+ cursor : pointer;
+}
+
<link rel="shortcut icon" type="image/png" href="images/favicon.png">
<script type="text/javascript" src="prototype.js"></script>
+ <script type="text/javascript" src="scriptaculous/scriptaculous.js"></script>
<script type="text/javascript" src="localized_js.php?<?php echo $dt_add ?>"></script>
-
<script type="text/javascript" src="tt-rss.js?<?php echo $dt_add ?>"></script>
<script type="text/javascript" src="functions.js?<?php echo $dt_add ?>"></script>
<script type="text/javascript" src="feedlist.js?<?php echo $dt_add ?>"></script>