summaryrefslogtreecommitdiff
path: root/htroot/js
diff options
context:
space:
mode:
authorluccioman <luccioman@users.noreply.github.com>2017-08-28 19:03:51 +0200
committerluccioman <luccioman@users.noreply.github.com>2017-08-28 19:03:51 +0200
commita1a05153125ad1201776ae7eae767c51add3269f (patch)
treef1124ad9ebd53357f48dcaf624c2ba90f81d081e /htroot/js
parent31c99b2a8a4b458cf6807ce29b8727f89a4991b8 (diff)
Added a button to manually refresh sorting of p2p search results.
As a server-side oriented alternative to the JavaScript realtime resorting feature proposed in PR #104. The goal is the same as in this PR : having the possibility compensate the network latency of various peers results fetching and obtain once possible a consistently ranked result set.
Diffstat (limited to 'htroot/js')
-rw-r--r--htroot/js/yacysearch.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.js
index 06314f7a7..d499d1213 100644
--- a/htroot/js/yacysearch.js
+++ b/htroot/js/yacysearch.js
@@ -110,6 +110,17 @@ function statistics(offset, itemscount, itemsperpage, totalcount, localResourceS
}
}
+ /* Display the eventual button allowing to refresh the sort of cached results
+ * only when all feeds are terminated and when there is more than one result */
+ var resortCachedElement = document.getElementById("resortCached");
+ if(resortCachedElement != null) {
+ if(feedRunning) {
+ resortCachedElement.style.visibility = "hidden";
+ } else if(totalcountIntValue > 1){
+ resortCachedElement.style.visibility = "visible";
+ }
+ }
+
if (totalcountIntValue == 0) {
return;
}