From 4d9ff3d556619a6579aae8c0f6ee9b2a7b23bea6 Mon Sep 17 00:00:00 2001 From: andi Date: Mon, 14 Feb 2005 21:48:37 +0100 Subject: visual feedback on search darcs-hash:20050214204837-9977f-6e6806a578341c8b94c5aca3121f2204fc153e8d.gz --- images/loading.gif | Bin 0 -> 1876 bytes inc/html.php | 12 ++++++++++++ script.js | 23 +++++++++++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 images/loading.gif diff --git a/images/loading.gif b/images/loading.gif new file mode 100644 index 000000000..240bd88c5 Binary files /dev/null and b/images/loading.gif differ diff --git a/inc/html.php b/inc/html.php index 5969198bd..b21ab4e57 100644 --- a/inc/html.php +++ b/inc/html.php @@ -538,6 +538,13 @@ function html_search(){ print parsedLocale('searchpage'); flush(); + //show progressbar + print '
'; + print ''; + print '
'; + //do quick pagesearch $data = array(); search($data,$conf['datadir'],'search_pagename',array(query => cleanID($QUERY))); @@ -571,6 +578,11 @@ function html_search(){ }else{ print '
'.$lang['nothingfound'].'
'; } + + //hide progressbar + print ''; } /** diff --git a/script.js b/script.js index db22d32b1..996652903 100644 --- a/script.js +++ b/script.js @@ -30,6 +30,29 @@ function escapeQuotes(text) { return text; } +/** + * Prints a animated gif to show the search is performed + * + * @author Andreas Gohr + */ +function showLoadBar(){ + if(document.getElementById){ + document.write(''); + } +} + +/** + * Disables the animated gif to show the search is done + * + * @author Andreas Gohr + */ +function hideLoadBar(){ + if(document.getElementById){ + document.getElementById('loading').style.display="none"; + } +} + /** * Checks if a summary was entered - if not the style is changed * -- cgit v1.2.3