- added navigation to next/prev search page using arrow keys (left/right)

- better information text for YaCy GUI application

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7134 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent 32f73d1aaa
commit 34a25856a5

@ -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">

@ -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>");
}

@ -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();

Loading…
Cancel
Save