From 15c5406b9cc7a58f72595083fc42d7a9c0dc24c0 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 10 Jun 2009 07:24:45 +0000 Subject: [PATCH] fixed yacyinteractive git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6040 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/yacyinteractive.html | 14 +++++++++++--- htroot/yacysearchtrailer.json | 2 +- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/htroot/yacyinteractive.html b/htroot/yacyinteractive.html index cdc038e73..f73469bbe 100644 --- a/htroot/yacyinteractive.html +++ b/htroot/yacyinteractive.html @@ -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 = "total results = " + totalResults; - if (firstChannel.topwords.length > 0) { + if (topics.length > 0) { var topwords = ""; - for (var i = 0; i < firstChannel.topwords.length; i++) { - topwords += "" + firstChannel.topwords[i].word + " "; + for (var i = 0; i < topics.elements.length; i++) { + topwords += "" + topics.elements[i].name + " "; if (i > 10) break; } html += "   topwords: " + topwords; diff --git a/htroot/yacysearchtrailer.json b/htroot/yacysearchtrailer.json index 3a394b505..618792a88 100644 --- a/htroot/yacysearchtrailer.json +++ b/htroot/yacysearchtrailer.json @@ -26,7 +26,7 @@ ] }#(/nav-authors)##(nav-topics)#:: { - "facetname": "topwords", + "facetname": "topics", "displayname": "Topics", "type": "String", "min": "0",