Skip to content

Commit

Permalink
undo last commit for further evaluation, a progressbar element is use…
Browse files Browse the repository at this point in the history
…d on other pages as well...

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4101 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
fuchsi committed Sep 17, 2007
1 parent 1880bba commit 6b8faaa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 38 deletions.
26 changes: 7 additions & 19 deletions htroot/env/base.css
Expand Up @@ -230,30 +230,18 @@ div.Tags {
padding-left: 5px;
}

div.ProgressBarCaption {
float:left;
width:70px;
}
div.ProgressBar {
width:100%;
height:1.5em;
position: relative; /* for "relative" absolute pos of children */
margin:1em auto;
text-align:left;
float:left;
width:100px;
height:10px;
}
div.ProgressBarFill {
margin:0px;
height:100%; /*not valid value for Netscape 8*/
position: absolute;
left: 0px;
top: 0px;
}

#resCounter {
/* left part of the progress bar */
position: absolute;
left: 1em;
}
div.ProgressBar > #pagenav {
/* right part of the progress bar */
position: absolute;
right: 1em;
}

div.bookmarkList, div.Tags {
Expand Down
29 changes: 13 additions & 16 deletions htroot/js/yacysearch.js
Expand Up @@ -12,44 +12,41 @@ function Progressbar(length, parent) {

// use this function to display the progress, because it updates everything
this.step = function(count) {
if (this.position < this.length)
this.position += count;

this.position += count;
// update the bar
this.percentage = this.position*(100/this.length);
this.fill.style.width = this.percentage + "%";

// if the end is reached, the bar is hidden/removed
if(this.position >= this.length) {
this.fill.style.visibility = "hidden";
}
if(this.position==this.length)
removeAllChildren(this.element);
}

// the actual progressbar
var bar = document.createElement("div");
bar.className = "ProgressBar";
bar.style.width = "100%";
bar.style.height = "20px";
bar.style.margin = "10px auto";
bar.style.textAlign = "left";

// the actual bar
this.fill = document.createElement("div");
this.fill.className = "ProgressBarFill";
this.fill.style.width = "0%"
bar.appendChild(this.fill);

// a description for the bar
var description = document.createTextNode(DESCRIPTION_STRING);
var textcontainer = document.createElement("strong");
textcontainer.appendChild(description);

// the container for the elements used by the Progressbar
this.element = document.createElement("div");
this.element.style.textAlign = "center";
// get hasLayout in IE, needed because of the percentage as width of the bar
this.element.className = "gainlayout";

// results counter inside progress bar
var resCounter = document.getElementById("resCounter");
resCounter.style.display = "inline";
bar.appendChild(resCounter);

// the result sites navigation
var pagenav = document.getElementById("pagenav");
pagenav.style.display = "inline";
bar.appendChild(pagenav);
this.element.appendChild(textcontainer);
this.element.appendChild(bar);
parent.appendChild(this.element);
}
Expand Down
5 changes: 2 additions & 3 deletions htroot/yacysearch.html
Expand Up @@ -99,9 +99,8 @@ <h2>#[promoteSearchPageGreeting]#</h2>
::
<p>No Results. (length of search words must be at least 3 characters)</p>
::
<div id="results"></div>
<span id="resCounter" style="display: none"><strong id="resultsOffset">#[offset]#</strong>-<strong id="itemscount">#[linkcount]#</strong> results from a total number of <strong id="totalcount">#[totalcount]#</strong> known#(globalresults)#.::, <strong id="globalcount">#[globalcount]#</strong> links from other YaCy peers.#(/globalresults)#</span>
<span id="pagenav" style="display: none">#[pagenav]#</span>
<p><strong id="resultsOffset">#[offset]#</strong>-<strong id="itemscount">#[linkcount]#</strong> results from a total number of <strong id="totalcount">#[totalcount]#</strong> known#(globalresults)#.::, <strong id="globalcount">#[globalcount]#</strong> links from other YaCy peers.#(/globalresults)#<div id="results"></div></p>
<p>Search Result Pages: <span id="pagenav">#[pagenav]#</span></p>
::
<p>Searching the web with this peer is disabled for unauthorized users. Please <a href="Status.html?login=">log in</a> as administrator to use the search function</p>
#(/num-results)#
Expand Down

0 comments on commit 6b8faaa

Please sign in to comment.