From 32c04430626da6095e213cfe6effafa577f9e3ab Mon Sep 17 00:00:00 2001 From: andi Date: Tue, 17 May 2005 22:17:19 +0200 Subject: 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 --- ajax.php | 4 ++++ inc/template.php | 25 ++++++++++++++++++++++--- tpl/default/design.css | 2 +- 3 files changed, 27 insertions(+), 4 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 ''.$lang['quickhits'].''; print html_buildlist($data,'qsearch','html_list_index'); } diff --git a/inc/template.php b/inc/template.php index 0720a12f6..2baa6f77e 100644 --- a/inc/template.php +++ b/inc/template.php @@ -331,7 +331,7 @@ function tpl_actionlink($type,$pre='',$suf=''){ */ function tpl_searchform(){ global $lang; - print ''; diff --git a/tpl/default/design.css b/tpl/default/design.css index 73914d3f9..3e743f20e 100644 --- a/tpl/default/design.css +++ b/tpl/default/design.css @@ -596,9 +596,9 @@ div.acladmin table{ div.ajax_qsearch { position:absolute; + right:225px;; text-align:left; width: 200px; background-color: #ff9; opacity: 0.9; - -moz-border-radius: 15px; } -- cgit v1.2.3