summaryrefslogtreecommitdiff
path: root/htroot/js/yacysearch.js
diff options
context:
space:
mode:
authorMichael Peter Christen <mc@yacy.net>2014-03-21 14:33:42 +0100
committerMichael Peter Christen <mc@yacy.net>2014-03-21 14:33:42 +0100
commitdeae992d470e93900fd4e52de453abc216ec6b3c (patch)
treed0fe64c00f9dd1d4d44532555af222215b6951d3 /htroot/js/yacysearch.js
parente2f25864291207c27cefbcabdd4eff2f58bc4394 (diff)
fixes to progess bar
Diffstat (limited to 'htroot/js/yacysearch.js')
-rw-r--r--htroot/js/yacysearch.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js
index 503311f5b..294197a03 100644
--- a/htroot/js/yacysearch.js
+++ b/htroot/js/yacysearch.js
@@ -15,9 +15,14 @@ function addHover() {
}
}
+function fadeOutBar() {
+ document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;backgroundColor:transparent;");
+}
+
function statistics(offset, itemscount, itemsperpage, totalcount, localResourceSize, remoteResourceSize, remoteIndexCount, remotePeerCount, navurlbase) {
if (totalcount == 0) return;
- if (offset >= 0) document.getElementById("startRecord").setAttribute('value', offset);
+ if (offset >= 0) document.getElementById("offset").innerHTML = offset;
+ if (offset >= 0) document.getElementById("startRecord").setAttribute('value', offset - 1);
if (itemscount >= 0) document.getElementById("itemscount").firstChild.nodeValue = itemscount;
document.getElementById("totalcount").firstChild.nodeValue = totalcount;
if (document.getElementById("localResourceSize") != null) document.getElementById("localResourceSize").firstChild.nodeValue = localResourceSize;
@@ -26,10 +31,14 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
if (document.getElementById("remotePeerCount") != null) document.getElementById("remotePeerCount").firstChild.nodeValue = remotePeerCount;
// compose page navigation
- percent = 100 * (itemscount - offset + 1) / itemsperpage;
+ var percent = 100 * (itemscount - offset + 1) / itemsperpage;
+ if (percent == 100) {
+ window.setTimeout(fadeOutBar, 500);
+ document.getElementById("progressbar").setAttribute('class',"progress-bar progress-bar-success");
+ }
document.getElementById("progressbar").setAttribute('style',"width:" + percent + "%");
- resnav = "<ul class=\"pagination\">";
+ var resnav = "<ul class=\"pagination\">";
thispage = Math.floor(offset / itemsperpage);
if (thispage == 0) {
resnav += "<li class=\"disabled\"><a href=\"#\">&laquo;</a></li>";