fixed yacyinteractive

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6040 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 16 years ago
parent 2c5554c912
commit 15c5406b9c

@ -29,6 +29,12 @@ function search(query) {
self.xmlHttpReq.send(null);
}
function navget(list, name) {
for (var i = 0; i < list.length; i++) {
if (list[i].facetname = name) return list[i];
}
}
function updatepage(str) {
var raw = document.getElementById("raw");
if (raw != null) raw.innerHTML = str;
@ -37,12 +43,14 @@ function updatepage(str) {
var totalResults = firstChannel.totalResults.replace(/[,.]/,"");
var startIndex = firstChannel.startIndex;
var itemsPerPage = firstChannel.itemsPerPage;
var navigation = firstChannel.navigation;
var topics = navget(navigation, "topics");
var html = "<span id=\"resCounter\" style=\"display: inline;\">total results = " + totalResults;
if (firstChannel.topwords.length > 0) {
if (topics.length > 0) {
var topwords = "";
for (var i = 0; i < firstChannel.topwords.length; i++) {
topwords += "<a href=\"yacyinteractive.html?query=" + firstChannel.searchTerms + "+" + firstChannel.topwords[i].word + "\">" + firstChannel.topwords[i].word + "</a> ";
for (var i = 0; i < topics.elements.length; i++) {
topwords += "<a href=\"yacyinteractive.html?query=" + firstChannel.searchTerms + "+" + topics.elements[i].name + "\">" + topics.elements[i].name + "</a> ";
if (i > 10) break;
}
html += "&nbsp;&nbsp;&nbsp;topwords: " + topwords;

@ -26,7 +26,7 @@
]
}#(/nav-authors)##(nav-topics)#::
{
"facetname": "topwords",
"facetname": "topics",
"displayname": "Topics",
"type": "String",
"min": "0",

Loading…
Cancel
Save