Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
no focus on preview frames for search integration fixes bug http://bugs.yacy.net/view.php?id=161
Lotus78f0d8f046f0
diff --git a/htroot/ConfigPortal.html b/htroot/ConfigPortal.htmlindex 7cdd4af7f..b74cd285c 100644--- a/htroot/ConfigPortal.html+++ b/htroot/ConfigPortal.html@@ -5,7 +5,7 @@<title>YaCy '#[clientname]#': Integration of a Search Portal</title>#%env/templates/metas.template%#</head>- <body id="ConfigSkins" onload="document.getElementById('promoteSearchPageGreeting').focus()">+ <body id="ConfigSkins">#%env/templates/header.template%##%env/templates/submenuPortalIntegration.template%#<h2>Integration of a Search Portal</h2>@@ -156,7 +156,7 @@</pre></fieldset>This would look like:<iframe name="target"- src="http://#[myaddress]#/index.html?display=2&resource=local"+ src="http://#[myaddress]#/index.html?display=2&resource=local&focus=0"width="100%"height="410"frameborder="0"@@ -179,7 +179,7 @@</pre></fieldset>This would look like:<iframe name="target2"- src="http://#[myaddress]#/yacysearch.html?display=2&resource=local"+ src="http://#[myaddress]#/yacysearch.html?display=2&resource=local&focus=0"width="100%"height="180"frameborder="0"@@ -203,7 +203,7 @@</pre></fieldset>This would look like:<iframe name="target3"- src="http://#[myaddress]#/yacyinteractive.html?display=2"+ src="http://#[myaddress]#/yacyinteractive.html?display=2&focus=0"width="100%"height="180"frameborder="0"diff --git a/htroot/WatchWebStructure_p.html b/htroot/WatchWebStructure_p.htmlindex da1a47d8d..8683ddf19 100644--- a/htroot/WatchWebStructure_p.html+++ b/htroot/WatchWebStructure_p.html@@ -20,7 +20,7 @@</style><script type="text/javascript"><!--- imagestub = "WebStructurePicture_p.png?host=#[besthost]#&depth=#[depth]#&width=#[width]#&height=#[height]#&nodes=#[nodes]#&time=#[time]#&colortext=#[colortext]#&colorback=#[colorback]#&colordot=#[colordot]#&colorline=#[colorline]#&colorlineend=#[colorlineend]#";+ imagestub = "WebStructurePicture_p.png?host=#[besthost]#&depth=#[depth]#&width=#[width]#&height=#[height]#&nodes=#[nodes]#&time=#[time]#&colortext=#[colortext]#&colorback=#[colorback]#&colordot=#[colordot]#&colorline=#[colorline]#&colorlineend=#[colorlineend]#";idx = 0;setTimeout("doanimation()", 3000);function doanimation() {diff --git a/htroot/index.html b/htroot/index.htmlindex a7fa56240..fbb18dcd4 100644--- a/htroot/index.html+++ b/htroot/index.html@@ -52,7 +52,7 @@});</script></head>- <body id="index" onload="document.getElementById('search').focus()">+ <body id="index" onload="#(focus)#::document.getElementById('search').focus()#(/focus)#">#(topmenu)##%env/templates/embeddedheader.template%#::@@ -218,7 +218,9 @@#(/searchoptions)#</form><script type="text/javascript">+ #(focus)#::document.getElementById("search").focus();+ #(/focus)#</script>#(topmenu)#diff --git a/htroot/index.java b/htroot/index.javaindex 2abbb162b..49cfcceab 100644--- a/htroot/index.java+++ b/htroot/index.java@@ -60,6 +60,7 @@ public class index {}boolean global = (post == null) ? true : post.get("resource", "global").equals("global");+ final boolean focus = (post == null) ? true : post.get("focus", "1").equals("1");int searchoptions = (post == null) ? 0 : Math.min(1, post.getInt("searchoptions", 0));if (!sb.getConfigBool("search.options", true)) searchoptions = 0;@@ -115,6 +116,7 @@ public class index {prop.put("type", type);prop.put("depth", "0");prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0);+ prop.put("focus", focus ? 1 : 0);prop.put("pi", sb.getConfigBool("publicAdministratorPi", false) ? 1 : 0);prop.putHTML("constraint", constraint);prop.put("searchdomswitches", sb.getConfigBool("search.text", true) || sb.getConfigBool("search.audio", true) || sb.getConfigBool("search.video", true) || sb.getConfigBool("search.image", true) || sb.getConfigBool("search.app", true) ? 1 : 0);diff --git a/htroot/yacyinteractive.html b/htroot/yacyinteractive.htmlindex abcbe2640..f24120475 100644--- a/htroot/yacyinteractive.html+++ b/htroot/yacyinteractive.html@@ -80,7 +80,9 @@ var q = "#[query]#";var s = "#[startRecord]#";var m = "#[maximumRecords]#";if (q != "") search(q, m, s);+#(focus)#::document.getElementById("search").focus();+#(/focus)#//]]></script>#%env/templates/footer.template%#diff --git a/htroot/yacyinteractive.java b/htroot/yacyinteractive.javaindex d4a103deb..01696fe54 100644--- a/htroot/yacyinteractive.java+++ b/htroot/yacyinteractive.java@@ -49,11 +49,13 @@ public class yacyinteractive {final String query = (post == null) ? "" : post.get("query", "");final String startRecord = (post == null) ? "0" : post.get("startRecord", "");final String maximumRecords = (post == null) ? "10" : post.get("maximumRecords", "");+ final boolean focus = (post == null) ? true : post.get("focus", "1").equals("1");prop.putHTML("query", query);prop.put("startRecord", startRecord);prop.put("maximumRecords", maximumRecords);prop.putHTML("querys", query.replaceAll(" ", "+"));prop.put("serverlist", query.length() == 0 ? 1 : 0);+ prop.put("focus", focus ? 1 : 0);prop.put("allowrealtime", sb.indexSegments.URLCount() < 100000 ? 1 : 0);return prop;}diff --git a/htroot/yacysearch.html b/htroot/yacysearch.htmlindex 3ff57319e..8627f55fe 100644--- a/htroot/yacysearch.html+++ b/htroot/yacysearch.html@@ -98,7 +98,9 @@ $(function() {$("#sidebarNameSpace").accordion({});$("#sidebarTopics").tagcloud({type:"sphere",power:.25,seed:0,sizemin:10,sizemax:20,height:80,colormin:"682",colormax:"20C"}).find("li").tsort();$("#sidebarAbout").accordion({});+#(focus)#::$("#search").focus();+#(/focus)#});//]]></script>@@ -176,7 +178,9 @@ document.getElementById("Enter").value = "search again";<!-- the search results --><script type="text/javascript">var progressbar = new Progressbar(#[results]#, document.getElementById("results"));+#(focus)#::document.getElementById("search").focus();+#(/focus)#</script><div style="float:left; width:70%;">diff --git a/htroot/yacysearch.java b/htroot/yacysearch.javaindex 6f1a7835a..7635a3f45 100644--- a/htroot/yacysearch.java+++ b/htroot/yacysearch.java@@ -118,6 +118,10 @@ public class yacysearch {final servletProperties prop = new servletProperties();prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0);+ //get focus option+ final boolean focus = (post == null) ? true : post.get("focus", "1").equals("1");+ prop.put("focus", focus ? 1 : 0);+// produce vocabulary navigation sidebarsCollection<Vocabulary> vocabularies = LibraryProvider.autotagging.getVocabularies();int j = 0;