Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
allow protocol navigator to be unselected if only one button is shown after activating navi/facetfilter
reger8e2cef5f07cc
diff --git a/htroot/yacysearchtrailer.html b/htroot/yacysearchtrailer.htmlindex 44f8dd92b..01fb25499 100644--- a/htroot/yacysearchtrailer.html+++ b/htroot/yacysearchtrailer.html@@ -71,7 +71,7 @@<p class="navbutton"></p><div class="btn-group btn-group-justified">#{element}#- <div class="btn-group btn-group-xs"><button type="button" class="btn btn-default#(on)#:: active#(/on)#"#(on)# onclick="window.location.href='#[url]#';"::#(/on)#>#[name]# (#[count]#)</button></div>+ <div class="btn-group btn-group-xs"><button type="button" class="btn btn-default#(on)#:: active#(/on)#"#(onclick)# onclick="window.location.href='#[url]#';"::#(/onclick)#>#[name]# (#[count]#)</button></div>#{/element}#</div>#(/nav-protocols)#diff --git a/htroot/yacysearchtrailer.java b/htroot/yacysearchtrailer.javaindex 6de89755d..853989157 100644--- a/htroot/yacysearchtrailer.java+++ b/htroot/yacysearchtrailer.java@@ -256,22 +256,25 @@ public class yacysearchtrailer {if (oldProtocolModifier == null || !oldProtocolModifier.equals(name)) {pos++;prop.put("nav-protocols_element_" + i + "_on", 0);+ prop.put("nav-protocols_element_" + i + "_onclick", 0);prop.put(fileType, "nav-protocols_element_" + i + "_modifier", nav);} else {neg++;prop.put("nav-protocols_element_" + i + "_on", 1);+ prop.put("nav-protocols_element_" + i + "_onclick", 1);prop.put(fileType, "nav-protocols_element_" + i + "_modifier", "-" + nav);nav="";rawNav = "";}prop.put(fileType, "nav-protocols_element_" + i + "_name", name);String url = QueryParams.navurl(fileType, 0, theSearch.query, rawNav, false).toString();- prop.put("nav-protocols_element_" + i + "_on_url", url);+ prop.put("nav-protocols_element_" + i + "_onclick_url", url);prop.put(fileType, "nav-protocols_element_" + i + "_url", url);prop.put("nav-protocols_element_" + i + "_count", count);prop.put("nav-protocols_element_" + i + "_nl", 1);i++;}+ if (i == 1) prop.put("nav-protocols_element_0_onclick", 0); // allow to unselect, if only one buttontheSearch.query.modifier.protocol = oldProtocolModifier;if (oldProtocolModifier != null && oldProtocolModifier.length() > 0) theSearch.query.modifier.add(oldProtocolModifier.startsWith("/") ? oldProtocolModifier : "/" + oldProtocolModifier);theSearch.query.getQueryGoal().query_original = oldQuery;