diff options
-rw-r--r-- | images/loading.gif | bin | 0 -> 1876 bytes | |||
-rw-r--r-- | inc/html.php | 12 | ||||
-rw-r--r-- | script.js | 23 |
3 files changed, 35 insertions, 0 deletions
diff --git a/images/loading.gif b/images/loading.gif Binary files differnew file mode 100644 index 000000000..240bd88c5 --- /dev/null +++ b/images/loading.gif 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 '<div align="center">'; + print '<script language="JavaScript" type="text/javascript">'; + print 'showLoadBar();'; + print '</script>'; + print '<br /></div>'; + //do quick pagesearch $data = array(); search($data,$conf['datadir'],'search_pagename',array(query => cleanID($QUERY))); @@ -571,6 +578,11 @@ function html_search(){ }else{ print '<div align="center">'.$lang['nothingfound'].'</div>'; } + + //hide progressbar + print '<script language="JavaScript" type="text/javascript">'; + print 'hideLoadBar();'; + print '</script>'; } /** @@ -31,6 +31,29 @@ function escapeQuotes(text) { } /** + * Prints a animated gif to show the search is performed + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +function showLoadBar(){ + if(document.getElementById){ + document.write('<img src="'+baseURL+'images/loading.gif" '+ + 'width="150" height="12" id="loading" />'); + } +} + +/** + * Disables the animated gif to show the search is done + * + * @author Andreas Gohr <andi@splitbrain.org> + */ +function hideLoadBar(){ + if(document.getElementById){ + document.getElementById('loading').style.display="none"; + } +} + +/** * Checks if a summary was entered - if not the style is changed * * @author Andreas Gohr <andi@splitbrain.org> |