projects
/
photo-tags.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
629e067
)
fix automatic tag completion
author
Arun Persaud
<arun@nubati.net>
Sun, 27 Nov 2011 06:27:47 +0000
(22:27 -0800)
committer
Arun Persaud
<apersaud@lbl.gov>
Sun, 27 Nov 2011 06:27:47 +0000
(22:27 -0800)
getjson.php
patch
|
blob
|
history
index.php
patch
|
blob
|
history
diff --git
a/getjson.php
b/getjson.php
index 028864652f2d282bea6814ad56c2f129d32f8ed0..14af09b3003bf7feb5f81a728e52b56f72228d79 100644
(file)
--- a/
getjson.php
+++ b/
getjson.php
@@
-20,8
+20,8
@@
if (isset($_REQUEST["S"]))
{
/* single tag or part of tag */
$tag = sqlite_escape_string($_REQUEST["S"]);
{
/* single tag or part of tag */
$tag = sqlite_escape_string($_REQUEST["S"]);
- /* individual tags are separated by '+' */
- $result = $DB->query("SELECT name FROM tags
where name like \"%$tag%\"
");
+
+ $result = $DB->query("SELECT name FROM tags");
$count = $DB->query("SELECT 1");
}
else
$count = $DB->query("SELECT 1");
}
else
diff --git
a/index.php
b/index.php
index a6112aba1ed4604d05d74d49726af0aa1c5acfd0..e5131db62d13d5975b99b8371dbb1b32b2e5bb6a 100644
(file)
--- a/
index.php
+++ b/
index.php
@@
-64,7
+64,7
@@
var count=0;
/* populate data list with tags*/
d3.json("<?php echo $webbase?>/getjson.php?S", function(json) {
/* populate data list with tags*/
d3.json("<?php echo $webbase?>/getjson.php?S", function(json) {
- d3.select("#MyTags").selectAll("option").data(json)
+ d3.select("#MyTags").selectAll("option").data(json
[1]
)
.enter().append("option").attr("value",function(d) {return d.name});
});
.enter().append("option").attr("value",function(d) {return d.name});
});