Skip to content

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

- added navigation to next/prev search page using arrow keys (left/right) - better information text for YaCy GUI application

orbiter34a25856a5d0
diff --git a/htroot/yacysearch.html b/htroot/yacysearch.html
index 51dbb4d22..71047868e 100644
--- a/htroot/yacysearch.html
+++ b/htroot/yacysearch.html
@@ -18,7 +18,25 @@
<link media="screen" type="text/css" href="/yacy/ui/css/themes/start/ui.theme.css" rel="stylesheet" />
::
#(/display)#
-
+ <script type="text/javascript">
+ //<![CDATA[
+ function handleArrowKeys(evt) {
+ evt = (evt) ? evt : ((window.event) ? event : null);
+ if (evt) {
+ switch (evt.keyCode) {
+ case 37:
+ window.location.href = document.getElementById("prevpage").href;
+ break;
+ case 39:
+ window.location.href = document.getElementById("nextpage").href;
+ break;
+ case 40:
+ }
+ }
+ }
+ document.onkeydown = handleArrowKeys;
+ //]]>
+ </script>
</head>
<body id="yacysearch">
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 85da95e2e..8f29244b8 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -617,7 +617,7 @@ public class yacysearch {
if (thispage == 0) {
resnav.append("<img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" />&nbsp;");
} else {
- resnav.append("<a href=\"");
+ resnav.append("<a id=\"prevpage\" href=\"");
resnav.append(QueryParams.navurl("html", thispage - 1, display, theQuery, originalUrlMask, null, navigation));
resnav.append("\"><img src=\"env/grafics/navdl.gif\" alt=\"arrowleft\" width=\"16\" height=\"16\" /></a>&nbsp;");
}
@@ -642,7 +642,7 @@ public class yacysearch {
if (thispage >= numberofpages) {
resnav.append("<img src=\"env/grafics/navdr.gif\" alt=\"arrowright\" width=\"16\" height=\"16\" />");
} else {
- resnav.append("<a href=\"");
+ resnav.append("<a id=\"nextpage\" href=\"");
resnav.append(QueryParams.navurl("html", thispage + 1, display, theQuery, originalUrlMask, null, navigation));
resnav.append("\"><img src=\"env/grafics/navdr.gif\" alt=\"arrowright\" width=\"16\" height=\"16\" /></a>");
}
diff --git a/source/net/yacy/gui/InfoPage.java b/source/net/yacy/gui/InfoPage.java
index 5299ff561..79f923f35 100644
--- a/source/net/yacy/gui/InfoPage.java
+++ b/source/net/yacy/gui/InfoPage.java
@@ -45,6 +45,7 @@ import javax.swing.text.JTextComponent;
import net.yacy.gui.framework.Browser;
import net.yacy.gui.framework.Layout;
import net.yacy.gui.framework.Switchboard;
+import net.yacy.kelondro.util.OS;
public class InfoPage implements Layout {
@@ -109,7 +110,14 @@ public class InfoPage implements Layout {
// make the scroll pane that contains the search result
JComponent mainText = new JEditorPane();
mainText.setPreferredSize(new java.awt.Dimension(480, 590));
- ((JEditorPane) mainText).setText("This is a very early test for a YaCy search gui.\nYou may enter a search term and press enter.");
+ String infotext =
+ "This is a very early test for a YaCy GUI.\n\n" +
+ "The YaCy administration interface is in your browser\n" +
+ "just open http://localhost:8080\n\n" +
+ "You may also enter a search term and press enter,\n" +
+ "then the query will be opened in your browser\n";
+ if (OS.isMacArchitecture) infotext += "\nThe application data on Mac is stored at ~Library/YaCy/\n";
+ ((JEditorPane) mainText).setText(infotext);
//page.add(new splashCanvas());
//SplashScreen splash = SplashScreen.getSplashScreen();