From f0f22e68bbfa39086df218e7a61412938155ae9a Mon Sep 17 00:00:00 2001 From: Michael Peter Christen Date: Fri, 21 Mar 2014 16:17:56 +0100 Subject: [PATCH] fix for page navigation bar --- htroot/js/yacysearch.js | 13 ++++++++----- htroot/yacysearch.html | 6 +++--- htroot/yacysearch.java | 38 -------------------------------------- 3 files changed, 11 insertions(+), 46 deletions(-) diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js index 294197a034..e81416e221 100644 --- a/htroot/js/yacysearch.js +++ b/htroot/js/yacysearch.js @@ -31,12 +31,15 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS if (document.getElementById("remotePeerCount") != null) document.getElementById("remotePeerCount").firstChild.nodeValue = remotePeerCount; // compose page navigation - var percent = 100 * (itemscount - offset + 1) / itemsperpage; - if (percent == 100) { - window.setTimeout(fadeOutBar, 500); - document.getElementById("progressbar").setAttribute('class',"progress-bar progress-bar-success"); + if (document.getElementById("progressbar").getAttribute('class') != "progress-bar progress-bar-success") { + var percent = 100 * (itemscount - offset + 1) / itemsperpage; + if (percent == 100) { + document.getElementById("progressbar").setAttribute('style',"transition:transform 0s;"); + document.getElementById("progressbar").setAttribute('class',"progress-bar progress-bar-success"); + window.setTimeout(fadeOutBar, 500); + } + document.getElementById("progressbar").setAttribute('style',"width:" + percent + "%"); } - document.getElementById("progressbar").setAttribute('style',"width:" + percent + "%"); var resnav = "