tag editor: autocomplete
This commit is contained in:
parent
d84f95234a
commit
05fcdf52b2
|
@ -1470,6 +1470,15 @@ function infobox_callback() {
|
||||||
box.style.display = "block";
|
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("");
|
notify("");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
exception_error("infobox_callback", e);
|
exception_error("infobox_callback", e);
|
||||||
|
|
|
@ -320,5 +320,22 @@
|
||||||
print_error_xml(6);
|
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>";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -376,9 +376,13 @@
|
||||||
|
|
||||||
print "<tr><td colspan='2'><input type=\"hidden\" name=\"id\" value=\"$param\"></td></tr>";
|
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
|
$result = db_query($link, "SELECT DISTINCT tag_name FROM ttrss_tags
|
||||||
WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY tag_name");
|
WHERE owner_uid = '".$_SESSION["uid"]."' ORDER BY tag_name");
|
||||||
|
@ -397,7 +401,7 @@
|
||||||
|
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
print "</tr>";
|
print "</tr>"; */
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|
29
tt-rss.css
29
tt-rss.css
|
@ -1649,3 +1649,32 @@ a[target="_new"], a[target="_blank"] {
|
||||||
border-color : #778899;
|
border-color : #778899;
|
||||||
border-style : dotted;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,8 @@
|
||||||
<link rel="shortcut icon" type="image/png" href="images/favicon.png">
|
<link rel="shortcut icon" type="image/png" href="images/favicon.png">
|
||||||
|
|
||||||
<script type="text/javascript" src="prototype.js"></script>
|
<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="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="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="functions.js?<?php echo $dt_add ?>"></script>
|
||||||
<script type="text/javascript" src="feedlist.js?<?php echo $dt_add ?>"></script>
|
<script type="text/javascript" src="feedlist.js?<?php echo $dt_add ?>"></script>
|
||||||
|
|
Loading…
Reference in New Issue