Skip to content

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

- fixed the handover of the searchterm and -type on index.html when the user clicks on "more options..." - some small changes to make index.html and the menu valid XHTML 1.0 strict - changed the inconsistent eol - characters in index.html to unix-ones

michitux110a1a2b16a7
diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template
index 6f00c0b44..7effa54d1 100644
--- a/htroot/env/templates/header.template
+++ b/htroot/env/templates/header.template
@@ -25,7 +25,7 @@
<h3>Monitoring</h3>
<ul class="menu">
<li><a href="/Network.html" accesskey="w" class="MenuItemLink">YaCy Network</a></li>
- <li><a href="/WatchWebStructure_p.html?host=auto&depth=2&time=1000" class="MenuItemLink lock">Crawl Activity</a></li>
+ <li><a href="/WatchWebStructure_p.html?host=auto&amp;depth=2&amp;time=1000" class="MenuItemLink lock">Crawl Activity</a></li>
<li><a href="/CrawlResults.html" class="MenuItemLink">Crawl Results</a></li>
<li><a href="/AccessTracker_p.html" class="MenuItemLink lock">Access Tracker</a></li>
<li><a href="/ViewLog_p.html" class="MenuItemLink lock">Server Log</a></li>
diff --git a/htroot/index.html b/htroot/index.html
index 9b5685430..4f45f066f 100644
--- a/htroot/index.html
+++ b/htroot/index.html
@@ -1,145 +1,146 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>YaCy '#[clientname]#': Search Page</title>
- #%env/templates/metas.template%#
- <link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="yacysearch.rss?search=#[former]#" />
- <link rel="search" type="application/opensearchdescription+xml" title="YaCy Search on '#[clientname]#'" href="opensearchdescription.xml" />
- </head>
- <body id="index" onload="document.getElementById('search').focus()">
- #(display)#
- #%env/templates/simpleheader.template%#
- ::
- #%env/templates/header.template%#
- ::
- #%env/templates/embeddedheader.template%#
- #(/display)#
-
- <h2 class="yacy">
- #[promoteSearchPageGreeting]#
- </h2>
-
- <form class="search" action="yacysearch.html" method="get" name="searchform" accept-charset="UTF-8">
- <fieldset class="maininput">
- <input type="hidden" name="display" value="#[display]#" />
- <input name="search" id="search" type="text" size="52" maxlength="80" value="#[former]#" />
- <input type="submit" name="Enter" value="Search" />
- <input type="hidden" name="former" value="#[former]#" /><br />
- <input type="radio" id="text" name="contentdom" value="text" #(contentdomCheckText)#::checked="checked"#(/contentdomCheckText)# /><label for="text">Text</label>&nbsp;&nbsp;
- <input type="radio" id="image" name="contentdom" value="image" #(contentdomCheckImage)#::checked="checked"#(/contentdomCheckImage)# /><label for="image">Images</label>&nbsp;&nbsp;
- <input type="radio" id="audio" name="contentdom" value="audio" #(contentdomCheckAudio)#::checked="checked"#(/contentdomCheckAudio)# /><label for="audio">Audio</label>&nbsp;&nbsp;
- <input type="radio" id="video" name="contentdom" value="video" #(contentdomCheckVideo)#::checked="checked"#(/contentdomCheckVideo)# /><label for="video">Video</label>&nbsp;&nbsp;
- <input type="radio" id="app" name="contentdom" value="app" #(contentdomCheckApp)#::checked="checked"#(/contentdomCheckApp)# /><label for="app">Applications</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
- #(searchoptions)#<!-- default values are hard-coded
- <input type="hidden" name="count" value="10" />
- <input type="hidden" name="resource" value="global" />
- <input type="hidden" name="time" value="6" />
- <input type="hidden" name="urlmaskfilter" value=".*" />
- <input type="hidden" name="prefermaskfilter" value="" />
- <input type="hidden" name="indexof" value="off" />-->
- </fieldset>
- <p><a href="/index.html?searchoptions=1&amp;display=#[display]#" onclick="this.href='/index.html?searchoptions=1&amp;display=#[display]#&amp;handover='+document.searchform.search.value">more options...</a></p>
- ::
- </fieldset>
-
- <table>
- <tr>
- <td><label for="count">Max. number of results</label>:</td>
- <td>
- <select id="count" name="count">
- <option #(count-10)#::selected="selected"#(/count-10)#>10</option>
- <option #(count-50)#::selected="selected"#(/count-50)#>50</option>
- <option #(count-100)#::selected="selected"#(/count-100)#>100</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="resource">Resource</label>:</td>
- <td>
- <select id="resource" name="resource">
- <option value="global" #(resource-global)#::selected="selected"#(/resource-global)#
- #(resource-global-disabled)#::disabled="disabled"#(/resource-global-disabled)#>global</option>
- <option value="local" #(resource-local)#::selected="selected"#(/resource-local)#>local</option>
- </select>
- #(resource-global-disabled)#::
- Global search is disabled because<br />#(reason)#
- <a class="lock" href="ConfigNetwork_p.html">DHT Distribution</a> is::
- <a class="lock" href="ConfigNetwork_p.html">Index Receive</a> is::
- <a class="lock" href="ConfigNetwork_p.html">DHT Distribution and Index Receive</a> are#(/reason)#
- disabled.#(/resource-global-disabled)#
- </td>
- </tr>
- <tr>
- <td><label for="time">Max. search time (seconds)</label>:</td>
- <td>
- <select id="time" name="time">
- <option #(time-1)#::selected="selected"#(/time-1)#>1</option>
- <option #(time-2)#::selected="selected"#(/time-2)#>2</option>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>YaCy '#[clientname]#': Search Page</title>
+ #%env/templates/metas.template%#
+ <link rel="alternate" type="application/rss+xml" title="Search for #[former]#" href="yacysearch.rss?search=#[former]#" />
+ <link rel="search" type="application/opensearchdescription+xml" title="YaCy Search on '#[clientname]#'" href="opensearchdescription.xml" />
+ <script type="text/javascript" src="js/html.js"></script>
+ </head>
+ <body id="index" onload="document.getElementById('search').focus()">
+ #(display)#
+ #%env/templates/simpleheader.template%#
+ ::
+ #%env/templates/header.template%#
+ ::
+ #%env/templates/embeddedheader.template%#
+ #(/display)#
+
+ <h2 class="yacy">
+ #[promoteSearchPageGreeting]#
+ </h2>
+
+ <form class="search" action="yacysearch.html" method="get" id="searchform" accept-charset="UTF-8">
+ <fieldset class="maininput">
+ <input type="hidden" name="display" value="#[display]#" />
+ <input name="search" id="search" type="text" size="52" maxlength="80" value="#[former]#" />
+ <input type="submit" name="Enter" value="Search" />
+ <input type="hidden" name="former" value="#[former]#" /><br />
+ <input type="radio" id="text" name="contentdom" value="text" #(contentdomCheckText)#::checked="checked"#(/contentdomCheckText)# /><label for="text">Text</label>&nbsp;&nbsp;
+ <input type="radio" id="image" name="contentdom" value="image" #(contentdomCheckImage)#::checked="checked"#(/contentdomCheckImage)# /><label for="image">Images</label>&nbsp;&nbsp;
+ <input type="radio" id="audio" name="contentdom" value="audio" #(contentdomCheckAudio)#::checked="checked"#(/contentdomCheckAudio)# /><label for="audio">Audio</label>&nbsp;&nbsp;
+ <input type="radio" id="video" name="contentdom" value="video" #(contentdomCheckVideo)#::checked="checked"#(/contentdomCheckVideo)# /><label for="video">Video</label>&nbsp;&nbsp;
+ <input type="radio" id="app" name="contentdom" value="app" #(contentdomCheckApp)#::checked="checked"#(/contentdomCheckApp)# /><label for="app">Applications</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+ #(searchoptions)#<!-- default values are hard-coded
+ <input type="hidden" name="count" value="10" />
+ <input type="hidden" name="resource" value="global" />
+ <input type="hidden" name="time" value="6" />
+ <input type="hidden" name="urlmaskfilter" value=".*" />
+ <input type="hidden" name="prefermaskfilter" value="" />
+ <input type="hidden" name="indexof" value="off" />-->
+ </fieldset>
+ <p><a href="/index.html?searchoptions=1&amp;display=#[display]#" onclick="this.href='/index.html?searchoptions=1&amp;display=#[display]#&amp;former='+document.getElementById('searchform').search.value+'&amp;contentdom='+radioValue(document.getElementById('searchform').contentdom)">more options...</a></p>
+ ::
+ </fieldset>
+
+ <table>
+ <tr>
+ <td><label for="count">Max. number of results</label>:</td>
+ <td>
+ <select id="count" name="count">
+ <option #(count-10)#::selected="selected"#(/count-10)#>10</option>
+ <option #(count-50)#::selected="selected"#(/count-50)#>50</option>
+ <option #(count-100)#::selected="selected"#(/count-100)#>100</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="resource">Resource</label>:</td>
+ <td>
+ <select id="resource" name="resource">
+ <option value="global" #(resource-global)#::selected="selected"#(/resource-global)#
+ #(resource-global-disabled)#::disabled="disabled"#(/resource-global-disabled)#>global</option>
+ <option value="local" #(resource-local)#::selected="selected"#(/resource-local)#>local</option>
+ </select>
+ #(resource-global-disabled)#::
+ Global search is disabled because<br />#(reason)#
+ <a class="lock" href="ConfigNetwork_p.html">DHT Distribution</a> is::
+ <a class="lock" href="ConfigNetwork_p.html">Index Receive</a> is::
+ <a class="lock" href="ConfigNetwork_p.html">DHT Distribution and Index Receive</a> are#(/reason)#
+ disabled.#(/resource-global-disabled)#
+ </td>
+ </tr>
+ <tr>
+ <td><label for="time">Max. search time (seconds)</label>:</td>
+ <td>
+ <select id="time" name="time">
+ <option #(time-1)#::selected="selected"#(/time-1)#>1</option>
+ <option #(time-2)#::selected="selected"#(/time-2)#>2</option>
<option #(time-4)#::selected="selected"#(/time-4)#>4</option>
- <option #(time-6)#::selected="selected"#(/time-6)#>6</option>
+ <option #(time-6)#::selected="selected"#(/time-6)#>6</option>
<option #(time-8)#::selected="selected"#(/time-8)#>8</option>
- <option #(time-10)#::selected="selected"#(/time-10)#>10</option>
- </select>
- </td>
- </tr>
- <tr>
- <td><label for="urlmaskfilter">URL mask</label>:</td>
- <td>#(urlmaskoptions)#
- <input id="urlmaskfilter" name="urlmaskfilter" type="text" size="12" maxlength="80" value="#[urlmaskfilter]#" />
- ::
- <input type="radio" name="urlmask" value="yes" checked /> restrict on <input name="urlmaskfilter" type="text" size="12" maxlength="80" value="#[urlmaskfilter]#" />
- <input type="radio" name="urlmask" value="no" /> show all
- #(/urlmaskoptions)#
- </td>
- </tr>
- <tr>
- <td>
- <label for="prefermaskfilter">Prefer mask</label>:
- </td>
- <td>
- #(prefermaskoptions)#
- <input id="prefermaskfilter" name="prefermaskfilter" type="text" size="12" maxlength="80" value="#[prefermaskfilter]#" />
- ::
- <input type="radio" name="prefermask" value="yes" checked="checked" /> restrict on <input name="prefermaskfilter" type="text" size="12" maxlength="80" value="#[prefermaskfilter]#" />
- <input type="radio" name="prefermask" value="no" /> show all
- #(/prefermaskoptions)#
- </td>
- </tr>
- <tr>
- <td>
- Constraints:
- </td>
- <td>
- <input type="checkbox" id="indexof" name="indexof" #[indexofChecked]# /> <label for="indexof">only index pages</label>
- </td>
- </tr>
- </table>
- #(/searchoptions)#
- <p>This peer holds #[links]# URLs</p>
- </form>
- #(searchoptions)#::
- <p>
- <form action="index.html" method="get" class="search">
- #(publicSearchpage)#
- <button type="submit" name="publicPage" value="0">
- <img src="/env/grafics/lock.gif" alt="authentication required" />
- Disable search function for users without autorization
- </button>
- ::
- <button type="submit" name="publicPage" value="1">
- <img src="/env/grafics/lock.gif" alt="authentication required" />
- Enable web search to everyone
- </button>
- #(/publicSearchpage)#
- </form>
- </p>
- #(/searchoptions)#
- #(display)#
- #%env/templates/simplefooter.template%#
- ::
- #%env/templates/footer.template%#
- ::
- #%env/templates/embeddedfooter.template%#
- #(/display)#
- </body>
-</html>
+ <option #(time-10)#::selected="selected"#(/time-10)#>10</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td><label for="urlmaskfilter">URL mask</label>:</td>
+ <td>#(urlmaskoptions)#
+ <input id="urlmaskfilter" name="urlmaskfilter" type="text" size="12" maxlength="80" value="#[urlmaskfilter]#" />
+ ::
+ <input type="radio" name="urlmask" value="yes" checked /> restrict on <input name="urlmaskfilter" type="text" size="12" maxlength="80" value="#[urlmaskfilter]#" />
+ <input type="radio" name="urlmask" value="no" /> show all
+ #(/urlmaskoptions)#
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <label for="prefermaskfilter">Prefer mask</label>:
+ </td>
+ <td>
+ #(prefermaskoptions)#
+ <input id="prefermaskfilter" name="prefermaskfilter" type="text" size="12" maxlength="80" value="#[prefermaskfilter]#" />
+ ::
+ <input type="radio" name="prefermask" value="yes" checked="checked" /> restrict on <input name="prefermaskfilter" type="text" size="12" maxlength="80" value="#[prefermaskfilter]#" />
+ <input type="radio" name="prefermask" value="no" /> show all
+ #(/prefermaskoptions)#
+ </td>
+ </tr>
+ <tr>
+ <td>
+ Constraints:
+ </td>
+ <td>
+ <input type="checkbox" id="indexof" name="indexof" #[indexofChecked]# /> <label for="indexof">only index pages</label>
+ </td>
+ </tr>
+ </table>
+ #(/searchoptions)#
+ <p>This peer holds #[links]# URLs</p>
+ </form>
+ #(searchoptions)#::
+ <form action="index.html" method="get" class="search">
+ <p>
+ #(publicSearchpage)#
+ <button type="submit" name="publicPage" value="0">
+ <img src="/env/grafics/lock.gif" alt="authentication required" />
+ Disable search function for users without autorization
+ </button>
+ ::
+ <button type="submit" name="publicPage" value="1">
+ <img src="/env/grafics/lock.gif" alt="authentication required" />
+ Enable web search to everyone
+ </button>
+ #(/publicSearchpage)#
+ </p>
+ </form>
+ #(/searchoptions)#
+ #(display)#
+ #%env/templates/simplefooter.template%#
+ ::
+ #%env/templates/footer.template%#
+ ::
+ #%env/templates/embeddedfooter.template%#
+ #(/display)#
+ </body>
+</html>
diff --git a/htroot/js/html.js b/htroot/js/html.js
index 1f8bd710d..7558d4f63 100644
--- a/htroot/js/html.js
+++ b/htroot/js/html.js
@@ -33,4 +33,9 @@ function createLinkCol(url, linktext){
link.appendChild(text);
col.appendChild(link);
return col;
-}
\ No newline at end of file
+}
+
+function radioValue(inputs) {
+ for (var i=0; i<inputs.length; i++) if (inputs[i].checked) return inputs[i].value;
+ return false;
+}