Skip to content
Snippets Groups Projects
Commit 9edac8a8 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

no more document.write for progressbar

darcs-hash:20060302140949-6e07b-d85f1e3f8989bd5fe8464f4f82ef8a14f8722eff.gz
parent 604e4efa
No related branches found
No related tags found
No related merge requests found
......@@ -332,11 +332,12 @@ function html_search(){
flush();
//show progressbar
print '<div class="centeralign">';
print '<div class="centeralign" id="dw__loading">';
print '<br /></div>';
print '<script type="text/javascript" charset="utf-8">';
print 'showLoadBar();';
print 'showLoadBar("dw__loading");';
print '</script>';
print '<br /></div>';
flush();
//do quick pagesearch
$data = array();
......@@ -379,8 +380,9 @@ function html_search(){
//hide progressbar
print '<script type="text/javascript" charset="utf-8">';
print 'hideLoadBar();';
print 'hideLoadBar("dw__loading");';
print '</script>';
flush();
}
/**
......
......@@ -129,10 +129,13 @@ function prependChild(parent,element) {
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function showLoadBar(){
if(document.getElementById){
document.write('<img src="'+DOKU_BASE+'lib/images/loading.gif" '+
'width="150" height="12" id="dw__loading" />');
function showLoadBar(id){
obj = $(id);
if(obj){
obj.innerHTML = '<img src="'+DOKU_BASE+'lib/images/loading.gif" '+
'width="150" height="12" alt="..." />';
obj.style.display="block";
}
}
......@@ -141,10 +144,9 @@ function showLoadBar(){
*
* @author Andreas Gohr <andi@splitbrain.org>
*/
function hideLoadBar(){
if(document.getElementById){
$('dw__loading').style.display="none";
}
function hideLoadBar(id){
obj = $(id);
if(obj) obj.style.display="none";
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment