summaryrefslogtreecommitdiff
path: root/ajax.php
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-05-17 22:17:19 +0200
committerandi <andi@splitbrain.org>2005-05-17 22:17:19 +0200
commit32c04430626da6095e213cfe6effafa577f9e3ab (patch)
tree0bf6fcbd9586d33ca2fc4bb5d478d58a11b59b6b /ajax.php
parentf330ee2babdb79935de1bf551f415518ddb73de6 (diff)
downloadrpg-32c04430626da6095e213cfe6effafa577f9e3ab.tar.gz
rpg-32c04430626da6095e213cfe6effafa577f9e3ab.tar.bz2
some ajax quicksearch tweaking
added a half second delay before the suggstions appear, moved the postion to appear besides the browsers autocomplete... I'm still not sure if this is useful at all. darcs-hash:20050517201719-9977f-6e71a415dd08a84af38bd3643860beb7002088f5.gz
Diffstat (limited to 'ajax.php')
-rw-r--r--ajax.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/ajax.php b/ajax.php
index 7af88d835..26bccc4d0 100644
--- a/ajax.php
+++ b/ajax.php
@@ -30,6 +30,7 @@ if(function_exists($call)){
*/
function ajax_qsearch(){
global $conf;
+ global $lang;
$query = cleanID($_REQUEST['q']);
if(empty($query)) return;
@@ -41,6 +42,9 @@ function ajax_qsearch(){
$data = array();
search($data,$conf['datadir'],'search_qsearch',array(query => $query),$nsdir);
+ if(!count($data)) return;
+
+ print '<b>'.$lang['quickhits'].'</b>';
print html_buildlist($data,'qsearch','html_list_index');
}