diff options
| author | orbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542> | 2009-06-10 07:24:45 +0000 |
|---|---|---|
| committer | orbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542> | 2009-06-10 07:24:45 +0000 |
| commit | 15c5406b9cc7a58f72595083fc42d7a9c0dc24c0 (patch) | |
| tree | a6a0a96e037c91a1756200612b80e0c616dbaf73 /htroot/yacyinteractive.html | |
| parent | 2c5554c912223f275722c41a3c84fdf7d91f4eb2 (diff) | |
fixed yacyinteractive
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6040 6c8d7289-2bf4-0310-a012-ef5d649a1542
Diffstat (limited to 'htroot/yacyinteractive.html')
| -rw-r--r-- | htroot/yacyinteractive.html | 14 |
1 files changed, 11 insertions, 3 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 = "<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 += " topwords: " + topwords; |
