Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Added HTML ids to search navigators for a more reliable JS refreshing.

luccioman4ab961fa46e0
diff --git a/htroot/js/yacysort.js b/htroot/js/yacysort.js
index 0bdfc7264..6090ce856 100644
--- a/htroot/js/yacysort.js
+++ b/htroot/js/yacysort.js
@@ -248,25 +248,20 @@ var processSidebar = function(data) {
// TODO: nav-dates
// domains (AKA providers)
- // TODO: test domains
- // TODO: we should assign an "id" attribute to the "domains" <ul>.
- processSidebarMenuGroup($("#domains_0").parent(), newSidebar.find("#domains_0").parent());
+ // TODO: test hosts
+ processSidebarMenuGroup($("#nav-hosts"), newSidebar.find("#nav-hosts"));
// TODO: test languages
- // TODO: we should assign an "id" attribute to the "languages" <ul>.
- processSidebarMenuGroup($("#languages_0").parent(), newSidebar.find("#languages_0").parent());
+ processSidebarMenuGroup($("#nav-languages"), newSidebar.find("#nav-languages"));
// TODO: test authors
- // TODO: we should assign an "id" attribute to the "authors" <ul>.
- processSidebarMenuGroup($("#authors_0").parent(), newSidebar.find("#authors_0").parent());
+ processSidebarMenuGroup($("#nav-authors"), newSidebar.find("#nav-authors"));
// TODO: test Wiki Name Space
- // TODO: we should assign an "id" attribute to the "namespace" <ul>.
- processSidebarMenuGroup($("#namespace_0").parent(), newSidebar.find("#namespace_0").parent());
+ processSidebarMenuGroup($("#nav-namespace"), newSidebar.find("#nav-namespace"));
// TODO: test filetype
- // TODO: we should assign an "id" attribute to the "filetype" <ul>.
- processSidebarMenuGroup($("#filetype_0").parent(), newSidebar.find("#filetype_0").parent());
+ processSidebarMenuGroup($("#nav-filetype"), newSidebar.find("#nav-filetype"));
// TODO: navs
diff --git a/htroot/yacysearchtrailer.html b/htroot/yacysearchtrailer.html
index 934ef3508..b2e02d03a 100644
--- a/htroot/yacysearchtrailer.html
+++ b/htroot/yacysearchtrailer.html
@@ -158,7 +158,7 @@ function toggleVisibility(name, count) {
</script>
#(nav-languages)#::
-<ul class="nav nav-sidebar menugroup">
+<ul id="nav-languages" class="nav nav-sidebar menugroup">
<li style="cursor: pointer; cursor: hand;"><h3 onclick="toggleVisibility('languages', #[count]#);">Language [#[count]#] <span style="float:right" id="chevron-languages" class="glyphicon glyphicon-chevron-down" title="click to expand facet"></span></h3></li>
#{element}#
<li style="display:none" id="#[id]#"><a href="#[url]#" class="MenuItemLink"><input type="checkbox" onchange="window.location.href='#[url]#'"#(on)# checked="checked"::#(/on)#/> #[name]# (#[count]#)</a></li>
@@ -167,7 +167,7 @@ function toggleVisibility(name, count) {
#(/nav-languages)#
#{navs}#
-<ul class="nav nav-sidebar menugroup">
+<ul id="nav-#[name]#" class="nav nav-sidebar menugroup">
<li style="cursor: pointer; cursor: hand;"><h3 onclick="toggleVisibility('#[name]#', #[count]#);">#[displayname]# [#[count]#] <span style="float:right" id="chevron-#[name]#" class="glyphicon glyphicon-chevron-down" title="click to expand facet"></span></h3></li>
#{element}#
<li style="display:none" id="#[id]#"><a href="#[url]#" class="MenuItemLink"><input type="checkbox" onchange="window.location.href='#[url]#'"#(on)# checked="checked"::#(/on)#/> #[name]# (#[count]#)</a></li>
@@ -176,7 +176,7 @@ function toggleVisibility(name, count) {
#{/navs}#
#{nav-vocabulary}#
-<ul class="nav nav-sidebar menugroup">
+<ul id="nav-vocabulary" class="nav nav-sidebar menugroup">
<li style="cursor: pointer; cursor: hand;"><h3 onclick="toggleVisibility('vocabulary_#[navname]#', #[count]#);">#[navname]# [#[count]#] <span style="float:right" id="chevron-vocabulary_#[navname]#" class="glyphicon glyphicon-chevron-down" title="click to expand facet"></span></h3></li>
#{element}#
<li style="display:none" id="#[id]#"><a href="#[url]#" class="MenuItemLink"><input type="checkbox" onchange="window.location.href='#[url]#'"#(on)# checked="checked"::#(/on)#/> #[name]# (#[count]#)</a></li>