Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
A few changes to the progress bar and search result statistics layout influenced by the discussion in <http://forum.yacy-websuche.de/viewtopic.php?f=5&t=268> with the idea of saving vertical space. Please check in every available browser and comment wether it's better than before. ;)
fuchsi1880bba420af
diff --git a/htroot/env/base.css b/htroot/env/base.cssindex e7a548f0e..b2ed80399 100644--- a/htroot/env/base.css+++ b/htroot/env/base.css@@ -230,18 +230,30 @@ div.Tags {padding-left: 5px;}-div.ProgressBarCaption {- float:left;- width:70px;-}div.ProgressBar {- float:left;- width:100px;- height:10px;+ width:100%;+ height:1.5em;+ position: relative; /* for "relative" absolute pos of children */+ margin:1em auto;+ text-align:left;}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 {diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.jsindex e30c7ce5f..d3e2583b6 100644--- a/htroot/js/yacysearch.js+++ b/htroot/js/yacysearch.js@@ -12,23 +12,22 @@ function Progressbar(length, parent) {// use this function to display the progress, because it updates everythingthis.step = function(count) {- this.position += count;+ if (this.position < this.length)+ this.position += count;+// update the barthis.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)- removeAllChildren(this.element);+ if(this.position >= this.length) {+ this.fill.style.visibility = "hidden";+ }}// the actual progressbarvar 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 barthis.fill = document.createElement("div");@@ -36,17 +35,21 @@ function Progressbar(length, parent) {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 Progressbarthis.element = document.createElement("div");this.element.style.textAlign = "center";// get hasLayout in IE, needed because of the percentage as width of the barthis.element.className = "gainlayout";- this.element.appendChild(textcontainer);++ // 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(bar);parent.appendChild(this.element);}diff --git a/htroot/yacysearch.html b/htroot/yacysearch.htmlindex 40dd0ca2b..d1ee1664c 100644--- a/htroot/yacysearch.html+++ b/htroot/yacysearch.html@@ -99,8 +99,9 @@ document.getElementById("Enter").value = "search again - catch up more links";::<p>No Results. (length of search words must be at least 3 characters)</p>::- <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>+ <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>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)#