Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
- added new input field in index.html - changed progress bar in yacysearch.html - moved pagination navigation to page bottom - moved search term input field to headline
Michael Peter Christen617dd9c97b5d
diff --git a/defaults/yacy.init b/defaults/yacy.initindex 5ae000d2d..725987a98 100644--- a/defaults/yacy.init+++ b/defaults/yacy.init@@ -979,11 +979,6 @@ publicSearchpage = true# to /Status.html to get the main memu bar backpublicTopmenu = true-# flag if a small link to the administration sites on the right bottom of the index-# page should be shown to all users.-# you might want to enabled this, if publicTopmenu is disabled-publicAdministratorPi = false-# Wiki access rights# the built-in wiki system allows by default only that the administrator is allowed to make changes# this can be changed. There are three options:diff --git a/htroot/env/base.css b/htroot/env/base.cssindex eea139756..0e94e5809 100644--- a/htroot/env/base.css+++ b/htroot/env/base.css@@ -327,7 +327,7 @@ clear:both;#resNav {/* right part of the progress bar */- float:right;+ float:left;}#resProgFill {@@ -713,7 +713,7 @@ form.search.small {}.searchinput {- font-size:16px;+ font-size:18px;}/*----------diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.templateindex 099d79534..536b63b68 100644--- a/htroot/env/templates/header.template+++ b/htroot/env/templates/header.template@@ -10,22 +10,19 @@</button><a class="forceNoExternalIcon navbar-brand" id="navbar-brand" href="/" style="position:absolute;top:-6px;display:inline;white-space:nowrap;"><img id="greeting-icon" class="yacylogo" src="/env/grafics/yacy.png" style="height:auto; width:auto; max-width:200px; max-height:32px;vertical-align:middle"> Administration-</a>- <form class="navbar-form " method="get" accept-charset="UTF-8" action="/yacysearch.html" style="padding-left:200px;">- <input name="query" placeholder="Search..." class="form-control" type="text" size="20" maxlength="80" value=""/>+ <form class="navbar-form" method="get" accept-charset="UTF-8" action="/yacysearch.html" style="padding-left:200px;max-width:400px;">+ <input name="query" placeholder="Search..." class="form-control" type="text" size="36" maxlength="200" value=""/><input type="hidden" name="verify" value="cacheonly" /><input type="hidden" name="maximumRecords" value="10" /><input type="hidden" name="resource" value="local" /><input type="hidden" name="urlmaskfilter" value=".*" /><input type="hidden" name="prefermaskfilter" value="" /><input type="hidden" name="nav" value="all" />- </form>-+ </form></div><div class="navbar-collapse collapse"><ul class="nav navbar-nav navbar-right">- <li> </li><li id="header_restart"><form action="/Steering.html" method="get" role="form"><input type="hidden" name="restart" value="" />diff --git a/htroot/index.html b/htroot/index.htmlindex efc8305c6..2560efc8e 100644--- a/htroot/index.html+++ b/htroot/index.html@@ -4,6 +4,7 @@#(forward)#::<meta http-equiv="REFRESH" content="0; url=#[target]#" />#(/forward)#<title>YaCy '#[clientname]#': Search Page</title>#%env/templates/metas.template%#+ <link href="/env/bootstrap/css/jumbotron-narrow.css" rel="stylesheet"><link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="yacysearch.rss?query=#[former]#" /><link rel="search" type="application/opensearchdescription+xml" title="YaCy Search on '#[clientname]#'" href="opensearchdescription.xml" /><link rel="stylesheet" type="text/css" media="screen" href="env/highslide.css" />@@ -44,18 +45,14 @@document.getElementById("navbar-brand").href="#[promoteSearchPageGreeting.homepage]#";</script>#(/topmenu)#-- #(pi)#::- <div style="position:fixed; bottom: 0; right: 1px;"><a href="Status.html">π</a></div>- #(/pi)#-+<h2 class="yacy"><a href="#[promoteSearchPageGreeting.homepage]#" class="yacylogo"><img src="#[promoteSearchPageGreeting.largeImage]#" alt="yacy" style="margin: auto;"/></a></h2><h2 class="yacy">#[promoteSearchPageGreeting]#</h2>-+<form class="search" action="yacysearch.html" method="get" id="searchform" accept-charset="UTF-8"><fieldset class="maininput">- <input name="query" class="searchinput" id="search" type="text" size="40" maxlength="80" value="#[former]#" onFocus="this.select()" />- <input type="submit" name="Enter" value="Search" />+ <input name="query" class="searchinput" id="search" type="text" size="40" maxlength="80" value="#[former]#" onFocus="this.select()" style="position:relative;top:1px;" />+ <button type="submit" name="query" id="search" class="btn btn-primary">Search</button><input type="hidden" name="verify" value="#[search.verify]#" />#(searchdomswitches)#::<div class="yacysearch">@@ -64,11 +61,11 @@#(searchaudio)#::<input type="radio" id="audio" name="contentdom" value="audio" #(check)#::checked="checked"#(/check)# /> Audio #(/searchaudio)##(searchvideo)#::<input type="radio" id="video" name="contentdom" value="video" #(check)#::checked="checked"#(/check)# /> Video #(/searchvideo)##(searchapp)#::<input type="radio" id="app" name="contentdom" value="app" #(check)#::checked="checked"#(/check)# /> Applications#(/searchapp)#- #(searchoptions)# <a href="index.html?searchoptions=1" onclick="this.href='/index.html?searchoptions=1&former='+document.getElementById('searchform').search.value+'&contentdom='+radioValue(document.getElementById('searchform').contentdom)">more options...</a>::#(/searchoptions)#+ #(searchoptions)# <a href="index.html?searchoptions=1" onclick="this.href='/index.html?searchoptions=1&former='+document.getElementById('searchinput').search.value+'&contentdom='+radioValue(document.getElementById('searchinput').contentdom)">more options...</a>::#(/searchoptions)#</div>#(/searchdomswitches)#<input type="hidden" name="nav" value="#[search.navigation]#" />- <input type="hidden" name="startRecord" value="0" />+ <input type="hidden" name="startRecord" id="startRecord" value="0" /><input type="hidden" name="indexof" value="off" /><input type="hidden" name="meanCount" value="5" />#(searchoptions)#diff --git a/htroot/index.java b/htroot/index.javaindex ebb3f69fb..7f1f268e1 100644--- a/htroot/index.java+++ b/htroot/index.java@@ -117,7 +117,6 @@ public class index {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);prop.put("searchdomswitches_searchoptions", searchoptions);diff --git a/htroot/js/yacysearch.js b/htroot/js/yacysearch.jsindex 0e36fe6cf..503311f5b 100644--- a/htroot/js/yacysearch.js+++ b/htroot/js/yacysearch.js@@ -1,58 +1,3 @@-function Progressbar(length, parent) {- // the number of steps of the bar- this.length = length;- // the current position, expressed in steps (so 100% = length)- this.position = 0;- // the current percentage of the bar- this.percentage = 0--- // use this function to display the progress, because it updates everything- this.step = function(count) {- if (this.position < this.length)- this.position += count;-- // update the bar- this.percentage = this.position*(100/this.length);- this.fill.style.width = this.percentage + "%";-- // if the end is reached, the bar is hidden/removed- if(this.position >= this.length) {- this.fill.style.visibility = "hidden";- }- }-- // the actual progressbar- var bar = document.createElement("div");- bar.id = "resProgBar";- bar.className ="ProgressBar";-- // the actual bar- this.fill = document.createElement("div");- this.fill.id = "resProgFill";- this.fill.className = "ProgressBarFill";- this.fill.style.width = "0%"- bar.appendChild(this.fill);-- // the container for the elements used by the Progressbar- this.element = document.createElement("div");- this.element.style.textAlign = "center";- // get hasLayout in IE, needed because of the percentage as width of the bar- this.element.className = "gainlayout";-- // results counter inside progress bar- var resCounter = document.getElementById("resCounter");- resCounter.style.display = "inline";- bar.appendChild(resCounter);-- // the result sites navigation- var resNav = document.getElementById("resNav");- resNav.style.display = "inline";- bar.appendChild(resNav);- this.element.appendChild(bar);- parent.appendChild(this.element);-}-function addHover() {if (document.all&&document.getElementById) {var divs = document.getElementsByTagName("div");@@ -72,16 +17,18 @@ function addHover() {function statistics(offset, itemscount, itemsperpage, totalcount, localResourceSize, remoteResourceSize, remoteIndexCount, remotePeerCount, navurlbase) {if (totalcount == 0) return;- if (offset >= 0) document.getElementById("resultsOffset").firstChild.nodeValue = offset;+ if (offset >= 0) document.getElementById("startRecord").setAttribute('value', offset);if (itemscount >= 0) document.getElementById("itemscount").firstChild.nodeValue = itemscount;document.getElementById("totalcount").firstChild.nodeValue = totalcount;if (document.getElementById("localResourceSize") != null) document.getElementById("localResourceSize").firstChild.nodeValue = localResourceSize;if (document.getElementById("remoteResourceSize") != null) document.getElementById("remoteResourceSize").firstChild.nodeValue = remoteResourceSize;if (document.getElementById("remoteIndexCount") != null) document.getElementById("remoteIndexCount").firstChild.nodeValue = remoteIndexCount;if (document.getElementById("remotePeerCount") != null) document.getElementById("remotePeerCount").firstChild.nodeValue = remotePeerCount;- document.getElementById("resNav").firstChild.nodeValue = "X";// compose page navigation+ percent = 100 * (itemscount - offset + 1) / itemsperpage;+ document.getElementById("progressbar").setAttribute('style',"width:" + percent + "%");+resnav = "<ul class=\"pagination\">";thispage = Math.floor(offset / itemsperpage);if (thispage == 0) {diff --git a/htroot/yacysearch.html b/htroot/yacysearch.htmlindex 197fc5ff5..34510d700 100644--- a/htroot/yacysearch.html+++ b/htroot/yacysearch.html@@ -98,10 +98,16 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de<div class="row"><div class="col-sm-8 col-sm-offset-4 col-md-9 col-md-offset-3 main">-<form class="search small" action="" method="get" accept-charset="UTF-8">- <fieldset class="yacys">- <input id="search" class="searchinput" name="query" type="text" size="40" maxlength="80" value="#[former]#" onFocus="this.select()" onclick="document.getElementById('Enter').value = 'Search'" />- <input id="Enter" type="submit" name="Enter" value="Search" />+<form class="search small" action="" method="get" accept-charset="UTF-8" style="position:absolute;top:-48px;left:200;z-index:1052;max-width:500px;">++ <div class="input-group">+ <input type="text" class="form-control searchinput typeahead" size="40" maxlength="200" placeholder="#(topmenu)##[promoteSearchPageGreeting]#::#[promoteSearchPageGreeting]##(/topmenu)#" name="query" value="#[former]#" onFocus="this.select()" id="search" onclick="document.getElementById('Enter').innerHTML = 'search'"/>+ <div class="input-group-btn">+ <button id="Enter" class="btn btn-default" type="submit">search</button>+ </div>+ </div>++ <!--#(searchdomswitches)#::<div class="yacysearch">#(searchtext)#::<input type="radio" id="text" name="contentdom" value="text" #(check)#::checked="checked"#(/check)# /> Text #(/searchtext)#@@ -113,9 +119,10 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de<a href="index.html?searchoptions=2&count=#[count]#&prefermaskfilter=#[prefermaskfilter]#&cat=#[cat]#&constraint=#[constraint]#&contentdom=#[contentdom]#&former=#[former]#&meanCount=#[meanCount]#">more options</a></div>#(/searchdomswitches)#+ --><input type="hidden" name="former" value="#[former]#" /><input type="hidden" name="maximumRecords" value="#[count]#" />- <input type="hidden" name="startRecord" value="0" />+ <input type="hidden" name="startRecord" id="startRecord" value="0" /><input type="hidden" name="verify" value="#[search.verify]#" /><input type="hidden" name="resource" value="#[resource]#" /><input type="hidden" name="nav" value="#[search.navigation]#" />@@ -124,8 +131,9 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de<input type="hidden" name="cat" value="#[cat]#" /><input type="hidden" name="constraint" value="#[constraint]#" /><input type="hidden" name="meanCount" value="#[meanCount]#" />- </fieldset>+</form>+<script>$("input:text:visible:first").focus();</script>#(urlmaskerror)#::<p><b>Illegal URL mask:</b> <i>#[urlmask]#</i> (not a valid regular expression), mask ignored.</p>#(/urlmaskerror)#@@ -141,7 +149,7 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de#(searchagain)#::<script type="text/javascript">-document.getElementById("Enter").value = "search again";+document.getElementById("Enter").innerHTML = "search again";</script>#(/searchagain)#@@ -159,20 +167,15 @@ document.getElementById("Enter").value = "search again";<p>No Results. (length of search words must be at least 2 characters)</p>::<div id="results"></div>- <span id="resCounter" style="display: inline;"><strong id="resultsOffset">#[offset]#</strong>-<strong id="itemscount">#[itemscount]#</strong> of <strong id="totalcount">#[totalcount]#</strong> #(globalresults)#::; (<strong id="localResourceSize">#[localResourceSize]#</strong> local, <strong id="remoteResourceSize">#[remoteResourceSize]#</strong> remote), <strong id="remoteIndexCount">#[remoteIndexCount]#</strong> from <strong id="remotePeerCount">#[remotePeerCount]#</strong> remote YaCy peers.#(/globalresults)#</span>- <span id="resNav" style="display: inline;">#[resnav]#</span>+ <div class="progress">+ <div class="progress-bar progress-bar-info" id="progressbar" role="progressbar" style="width:0%;">+ <strong id="offset">#[offset]#</strong>-<strong id="itemscount">#[itemscount]#</strong> of <strong id="totalcount">#[totalcount]#</strong> #(globalresults)#::; (<strong id="localResourceSize">#[localResourceSize]#</strong> local, <strong id="remoteResourceSize">#[remoteResourceSize]#</strong> remote), <strong id="remoteIndexCount">#[remoteIndexCount]#</strong> from <strong id="remotePeerCount">#[remotePeerCount]#</strong> remote YaCy peers.#(/globalresults)#+ </div>+ </div>::<p>Searching the web with this peer is disabled for unauthorized users. Please <a href="Status.html?login=">log in</a> as administrator to use the search function</p>#(/num-results)#-<!-- the search results -->-<script type="text/javascript">-var progressbar = new Progressbar(#[results]#, document.getElementById("results"));-#(focus)#::-document.getElementById("search").focus();-#(/focus)#-</script>-<!-- show openstreetmap tiles if geoinfo was found -->#(geoinfo)#::@@ -205,6 +208,14 @@ document.getElementById("search").focus();<!-- attach the bottomline (customer option) --><!--#(pageNavBottom)#::<div id="pageNavBottom" style="text-align:center">#[resnav]#</div>#(/pageNavBottom)#-->+#(num-results)#+ ::+ ::+ ::+ <span id="resNav" style="display: inline;">#[resnav]#</span>+</div>+ ::+#(/num-results)#</div> <!-- close main -->@@ -215,9 +226,6 @@ document.getElementById("search").focus();//<![CDATA[$(function() {$("#sidebarTopics").tagcloud({type:"sphere",power:.25,seed:0,sizemin:10,sizemax:20,height:80,colormin:"682",colormax:"20C"}).find("li").tsort();-#(focus)#::- $("#search").focus();-#(/focus)#});//]]></script>diff --git a/htroot/yacysearch.java b/htroot/yacysearch.javaindex bc3167575..171d732de 100644--- a/htroot/yacysearch.java+++ b/htroot/yacysearch.java@@ -127,9 +127,6 @@ public class yacysearch {final servletProperties prop = new servletProperties();prop.put("topmenu", sb.getConfigBool("publicTopmenu", true) ? 1 : 0);- //get focus option- prop.put("focus", ((post == null) ? true : post.get("focus", "1").equals("1")) ? 1 : 0);-// produce vocabulary navigation sidebarsCollection<Tagging> vocabularies = LibraryProvider.autotagging.getVocabularies();int j = 0;diff --git a/htroot/yacysearchitem.html b/htroot/yacysearchitem.htmlindex 7de288c77..8f51dfc11 100644--- a/htroot/yacysearchitem.html+++ b/htroot/yacysearchitem.html@@ -56,6 +56,5 @@<script type="text/javascript">statistics("#[offset]#", "#[itemscount]#", "#[itemsperpage]#", "#[totalcount]#", "#[localResourceSize]#", "#[remoteResourceSize]#", "#[remoteIndexCount]#", "#[remotePeerCount]#", "#[navurlBase]#");-progressbar.step(1);</script>