summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormikeworks <mikeworks@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-09-29 20:06:39 +0000
committermikeworks <mikeworks@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-09-29 20:06:39 +0000
commit421aa6a8bb4b59ff4bdb6f15e4117a8ffa0e5aa1 (patch)
treeef5e3948ef2858dcc921426bb2a14d1eed401af6
parentc60aed44352067f708c418ebf83f5a6337dfc6eb (diff)
ConfigLiveSearch.html: Fixed some HTML problems to validate at least XHTML 1.0 Transitional - strict is not possible because iframes are used. Replacing iframes with embedded object tag does not work in IE
ConfigPortal.html: Fixed some HTML problems to validate at least XHTML 1.0 Transitional - for strict the target attribute of the a link has to be removed yacyinteractive.html: Moved all JS code to an external yacyinteractive.js file in JS folder yacysearch.html: Removed embedded scripts from in between the body tags - now everything is loaded in the header de.lng: Just in case JS files will be parsed at some point added translation for yacyinteractive.html result counter git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7208 6c8d7289-2bf4-0310-a012-ef5d649a1542
-rw-r--r--htroot/ConfigLiveSearch.html14
-rw-r--r--htroot/ConfigPortal.html55
-rw-r--r--htroot/js/yacyinteractive.js71
-rw-r--r--htroot/yacyinteractive.html76
-rw-r--r--htroot/yacysearch.html16
-rw-r--r--locales/de.lng7
6 files changed, 119 insertions, 120 deletions
diff --git a/htroot/ConfigLiveSearch.html b/htroot/ConfigLiveSearch.html
index 6bc86d5fa..a833e2b81 100644
--- a/htroot/ConfigLiveSearch.html
+++ b/htroot/ConfigLiveSearch.html
@@ -1,4 +1,5 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<!-- This page is only XHTML 1.0 Transitional and not Strict because the target attribute for a links are being used -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>YaCy '#[clientname]#': Integration of a Search Field for Live Search</title>
@@ -50,7 +51,7 @@
</pre>
<h4>Configuration options and defaults for 'yconf':</h4>
<h5>Defaults</h5>
-<form><dl>
+<form action=""><dl>
<dt>url</dt><dd>is a mandatory property - no default</dd>
<dt>global</dt><dd>false</dd>
<dt>theme</dt><dd>'start'</dd>
@@ -73,11 +74,13 @@ Specifies where the dialog should be displayed. Possible values for position: 'c
The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.
<h5>Interaction (modal | resizable)</h5>
If modal is set to true, the dialog will have modal behavior; other items on the page will be disabled (i.e. cannot be interacted with). Modal dialogs create an overlay below the dialog but above other page elements.
-<p/>
+<p>
If resizable is set to true, the dialog will be resizeable.
+</p>
<h5>Load JavaScript load_js (true | false)</h5>
<p>
If load_js is set to false, you have to manually load the needed JavaScript on your portal page. This can help to avoid timing problems or double loading.
+</p>
<pre>
&lt;script src="/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="/yacy/ui/js/jquery-ui-1.7.2.min.js" type="text/javascript"&gt;&lt;/script&gt;
@@ -86,16 +89,15 @@ If load_js is set to false, you have to manually load the needed JavaScript on y
&lt;script src="/yacy/ui/js/jquery.form.js"&gt;&lt;/script&gt;
&lt;script src="/yacy/ui/js/jquery.field.min.js"&gt;&lt;/script&gt;
</pre>
-</p>
<h5>Load Stylesheets load_css (true | false)</h5>
<p>
If load_css is set to false, you have to manually load the needed CSS on your portal page. This can help to avoid timing problems or double loading.
+</p>
<pre>
&lt;link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.base.css" rel="stylesheet" /&gt;
&lt;link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.theme.css" rel="stylesheet" /&gt;
&lt;link media="screen" type="text/css" href="/yacy/ui/css/yacyui-portalsearch.css" rel="stylesheet" /&gt;
-<pre>
-</p>
+</pre>
<h5>Themes</h5>
<p>You can <a href="http://jquery-ui.googlecode.com/files/jquery-ui-themes-1.7.zip" target="_blank">
download</a> ready made themes or <a href="http://jqueryui.com/themeroller/" target="_blank">create</a>
diff --git a/htroot/ConfigPortal.html b/htroot/ConfigPortal.html
index ace22336b..976fd78ac 100644
--- a/htroot/ConfigPortal.html
+++ b/htroot/ConfigPortal.html
@@ -1,4 +1,5 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<!-- This page is only XHTML 1.0 Transitional and not Strict because iframes are in use -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>YaCy '#[clientname]#': Integration of a Search Portal</title>
@@ -49,20 +50,20 @@
The search page can be integrated in your own web pages with an iframe. Simply use the following code:
</h3>
<fieldset><pre>
- &lt;iframe name="target"
- src="http://#[myaddress]#/index.html?display=2&amp;resource=local"
- width="100%"
- height="560"
- frameborder="0"
- scrolling="auto"
- id="target"&gt;
+ &lt;iframe name=&quot;target&quot;
+ src=&quot;http://#[myaddress]#/index.html?display=2&amp;resource=local&quot;
+ width=&quot;100%&quot;
+ height=&quot;410&quot;
+ frameborder=&quot;0&quot;
+ scrolling=&quot;auto&quot;
+ id=&quot;target&quot;&gt;
&lt;/iframe&gt;
</pre></fieldset>
This would look like:
<iframe name="target"
src="http://#[myaddress]#/index.html?display=2&amp;resource=local"
width="100%"
- height="340"
+ height="410"
frameborder="0"
scrolling="auto"
id="target">
@@ -72,46 +73,46 @@
For a search page with a small header, use this code:
</h3>
<fieldset><pre>
- &lt;iframe name="target"
- src="http://#[myaddress]#/yacysearch.html?display=2&amp;resource=local"
- width="100%"
- height="560"
- frameborder="0"
- scrolling="auto"
- id="target"&gt;
+ &lt;iframe name=&quot;target2&quot;
+ src=&quot;http://#[myaddress]#/yacysearch.html?display=2&amp;resource=local&quot;
+ width=&quot;100%&quot;
+ height=&quot;180&quot;
+ frameborder=&quot;0&quot;
+ scrolling=&quot;auto&quot;
+ id=&quot;target2&quot;&gt;
&lt;/iframe&gt;
</pre></fieldset>
This would look like:
- <iframe name="target"
+ <iframe name="target2"
src="http://#[myaddress]#/yacysearch.html?display=2&amp;resource=local"
width="100%"
height="180"
frameborder="0"
scrolling="auto"
- id="target">
+ id="target2">
</iframe>
<h3>
A third option is the interactive search. Use this code:
</h3>
<fieldset><pre>
- &lt;iframe name="target"
- src="http://#[myaddress]#/yacyinteractive.html?display=2"
- width="100%"
- height="560"
- frameborder="0"
- scrolling="auto"
- id="target"&gt;
+ &lt;iframe name="target3"
+ src=&quot;http://#[myaddress]#/yacyinteractive.html?display=2&quot;
+ width=&quot;100%&quot;
+ height=&quot;180&quot;
+ frameborder=&quot;0&quot;
+ scrolling=&quot;auto&quot;
+ id=&quot;target3&quot;&gt;
&lt;/iframe&gt;
</pre></fieldset>
This would look like:
- <iframe name="target"
+ <iframe name="target3"
src="http://#[myaddress]#/yacyinteractive.html?display=2"
width="100%"
height="180"
frameborder="0"
scrolling="auto"
- id="target">
+ id="target3">
</iframe>
#%env/templates/footer.template%#
diff --git a/htroot/js/yacyinteractive.js b/htroot/js/yacyinteractive.js
new file mode 100644
index 000000000..6faab7818
--- /dev/null
+++ b/htroot/js/yacyinteractive.js
@@ -0,0 +1,71 @@
+function xmlhttpPost() {
+ var searchform = document.forms['searchform'];
+ search(searchform.query.value);
+}
+
+function search(query) {
+// var xmlHttpReq = false;
+ var self = this;
+ if (window.XMLHttpRequest) { // Mozilla/Safari
+ self.xmlHttpReq = new XMLHttpRequest();
+ }
+ else if (window.ActiveXObject) { // IE
+ self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
+ }
+ self.xmlHttpReq.open('GET', "yacysearch.json?verify=false&resource=local&maximumRecords=100&nav=topics&query=" + query, true);
+ self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+ self.xmlHttpReq.onreadystatechange = function() {
+ if (self.xmlHttpReq.readyState == 4) {
+ updatepage(self.xmlHttpReq.responseText);
+ }
+ }
+ self.xmlHttpReq.send(null);
+}
+
+function navget(list, name) {
+ for (var i = 0; i < list.length; i++) {
+ if (list[i].facetname == name) return list[i];
+ }
+}
+
+function updatepage(str) {
+ var raw = document.getElementById("raw");
+ if (raw != null) raw.innerHTML = str;
+ var rsp = eval("("+str+")");
+ var firstChannel = rsp.channels[0];
+ var totalResults = firstChannel.totalResults.replace(/[,.]/,"");
+// var startIndex = firstChannel.startIndex;
+// var itemsPerPage = firstChannel.itemsPerPage;
+ var navigation = firstChannel.navigation;
+ var topics = navget(navigation, "topics");
+
+ var html = "<span id=\"resCounter\" style=\"display: inline;\">total results = " + totalResults;
+ if (topics.length > 0) {
+ var topwords = "";
+ for (var i = 0; i < topics.elements.length; i++) {
+ topwords += "<a href=\"yacyinteractive.html?query=" + firstChannel.searchTerms + "+" + topics.elements[i].name + "\">" + topics.elements[i].name + "</a> ";
+ if (i > 10) break;
+ }
+ html += "&nbsp;&nbsp;&nbsp;topwords: " + topwords;
+ }
+ html += "</span><br>";
+
+ if (totalResults > 0) {
+ var item;
+ html += "<table class=\"sortable\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"99%\">";
+ html += "<tr class=\"TableHeader\" valign=\"bottom\">";
+ html += "<td>Name</td>";
+ html += "<td width=\"60\">Size</td>";
+ //html += "<td>Description</td>";
+ html += "<td width=\"180\">Date</td></tr>";
+ for (var i = 0; i < firstChannel.items.length; i++) {
+ item = firstChannel.items[i];
+ html += "<tr class=\"TableCellLight\"><td align=\"left\"><a href=\"" + item.link + "\">" + item.title + "</a></td>";
+ html += "<td align=\"right\">" + item.sizename + "</td>";
+ //html += "<td>" + item.description + "</td>";
+ html += "<td align=\"right\">" + item.pubDate + "</td></tr>";
+ }
+ html += "</table>";
+ }
+ document.getElementById("searchresults").innerHTML = html;
+} \ No newline at end of file
diff --git a/htroot/yacyinteractive.html b/htroot/yacyinteractive.html
index 000a7b4d0..f003dc5b0 100644
--- a/htroot/yacyinteractive.html
+++ b/htroot/yacyinteractive.html
@@ -3,81 +3,7 @@
<head>
<title>YaCy Interactive Search</title>
#%env/templates/metas.template%#
-<script type="text/javascript">
-//<![CDATA[
-function xmlhttpPost() {
- var searchform = document.forms['searchform'];
- search(searchform.query.value);
-}
-
-function search(query) {
-// var xmlHttpReq = false;
- var self = this;
- if (window.XMLHttpRequest) { // Mozilla/Safari
- self.xmlHttpReq = new XMLHttpRequest();
- }
- else if (window.ActiveXObject) { // IE
- self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
- }
- self.xmlHttpReq.open('GET', "yacysearch.json?verify=false&resource=local&maximumRecords=100&nav=topics&query=" + query, true);
- self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
- self.xmlHttpReq.onreadystatechange = function() {
- if (self.xmlHttpReq.readyState == 4) {
- updatepage(self.xmlHttpReq.responseText);
- }
- }
- self.xmlHttpReq.send(null);
-}
-
-function navget(list, name) {
- for (var i = 0; i < list.length; i++) {
- if (list[i].facetname == name) return list[i];
- }
-}
-
-function updatepage(str) {
- var raw = document.getElementById("raw");
- if (raw != null) raw.innerHTML = str;
- var rsp = eval("("+str+")");
- var firstChannel = rsp.channels[0];
- var totalResults = firstChannel.totalResults.replace(/[,.]/,"");
-// var startIndex = firstChannel.startIndex;
-// var itemsPerPage = firstChannel.itemsPerPage;
- var navigation = firstChannel.navigation;
- var topics = navget(navigation, "topics");
-
- var html = "<span id=\"resCounter\" style=\"display: inline;\">total results = " + totalResults;
- if (topics.length > 0) {
- var topwords = "";
- for (var i = 0; i < topics.elements.length; i++) {
- topwords += "<a href=\"yacyinteractive.html?query=" + firstChannel.searchTerms + "+" + topics.elements[i].name + "\">" + topics.elements[i].name + "</a> ";
- if (i > 10) break;
- }
- html += "&nbsp;&nbsp;&nbsp;topwords: " + topwords;
- }
- html += "</span><br>";
-
- if (totalResults > 0) {
- var item;
- html += "<table class=\"sortable\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\" width=\"99%\">";
- html += "<tr class=\"TableHeader\" valign=\"bottom\">";
- html += "<td>Name</td>";
- html += "<td width=\"60\">Size</td>";
- //html += "<td>Description</td>";
- html += "<td width=\"180\">Date</td></tr>";
- for (var i = 0; i < firstChannel.items.length; i++) {
- item = firstChannel.items[i];
- html += "<tr class=\"TableCellLight\"><td align=\"left\"><a href=\"" + item.link + "\">" + item.title + "</a></td>";
- html += "<td align=\"right\">" + item.sizename + "</td>";
- //html += "<td>" + item.description + "</td>";
- html += "<td align=\"right\">" + item.pubDate + "</td></tr>";
- }
- html += "</table>";
- }
- document.getElementById("searchresults").innerHTML = html;
-}
-//]]>
-</script>
+<script type="text/javascript" src="/js/yacyinteractive.js"></script>
<script type="text/javascript" src="/js/sorttable.js"></script>
</head>
<body>
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index aa8a52062..3789678fa 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -11,13 +11,11 @@
<script type="text/javascript" src="/js/yacysearch.js"></script>
<script type="text/javascript" src="/js/highslide/highslide.js"></script>
<script type="text/javascript">hs.outlineType = 'rounded-white';</script>
- #(display)#
- <script src="/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="/yacy/ui/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
- <link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.base.css" rel="stylesheet" />
- <link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.theme.css" rel="stylesheet" />
- ::
- #(/display)#
+ <script src="/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
+ <script src="/yacy/ui/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
+ <link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.base.css" rel="stylesheet" />
+ <link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.theme.css" rel="stylesheet" />
+
<script type="text/javascript">
//<![CDATA[
function handleArrowKeys(evt) {
@@ -58,10 +56,6 @@ To see a list of all APIs, please visit the <a href="http://www.yacy-websuche.de
#%env/templates/header.template%#
::
#%env/templates/embeddedheader.template%#
- <script src="/yacy/ui/js/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="/yacy/ui/js/jquery-ui-1.7.2.min.js" type="text/javascript"></script>
- <link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.base.css" rel="stylesheet" />
- <link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.theme.css" rel="stylesheet" />
#(/display)#
<script type="text/javascript">
diff --git a/locales/de.lng b/locales/de.lng
index 645e9d9aa..8af1a3ca6 100644
--- a/locales/de.lng
+++ b/locales/de.lng
@@ -629,7 +629,7 @@ URL of a Small Corporate Image<==URL des kleinen Corporate Identity Bildes<
URL of a Large Corporate Image<==URL des großen Corporate Identity Bildes<
Default Pop-Up Page<==Standard Pop-up<
>Status Page==>Status Seite
->Search Front Page==Frontseite Suche
+>Search Front Page==>Frontseite Suche
>Search Page \(small header\)==>Suchseite (kleine Kopfzeile)
>Interactive Search Page==>Interaktive Suchseite
"Change Search Page"=="Ändere die Suchseite"
@@ -3456,6 +3456,11 @@ PLEASE REPLACE THIS PAGE BY PUTTING A FILE index.html INTO THE PATH==BITTE ERSET
"Pause this queue"=="Diese Queue anhalten"
#-----------------------------
+#File: js/yacyinteractive.js
+#---------------------------
+>total results==>Gesamte Ergebnisse
+#-----------------------------
+
#File: yacy/ui/js/jquery-flexigrid.js
#---------------------------
'Displaying \{from\} to \{to\} of \{total}\ items'=='Zeige {from} bis {to} von {total} Elementen'