Author: toad
Date: 2008-11-12 17:29:40 +0000 (Wed, 12 Nov 2008)
New Revision: 23518
Modified:
trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
Log:
Hardcoded, ugly search box using XMLLibrarian. But it has an up to date index,
albeit an incomplete one, and it works.
Notable missing features: adjacent word matches, inlining in freesites, making
it look good!
Modified: trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java 2008-11-12
17:28:05 UTC (rev 23517)
+++ trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java 2008-11-12
17:29:40 UTC (rev 23518)
@@ -562,6 +562,15 @@
}
HTMLNode bookmarkBoxContent = bookmarkBox.addChild("div", "class",
"infobox-content");
+
+ // Search box
+
if(core.node.pluginManager.isPluginLoaded("plugins.XMLLibrarian.XMLLibrarian"))
{
+ HTMLNode form = bookmarkBoxContent.addChild("form", new
String[] { "method", "action" }, new String[] { "GET",
"/plugins/plugins.XMLLibrarian.XMLLibrarian" });
+ form.addChild("input", new String[] { "type", "name", "value"
}, new String[] { "hidden", "choice", "index" });
+ form.addChild("input", new String[] { "type", "size", "name" },
new String[] { "text", "80", "search" });
+ form.addChild("input", new String[] { "type", "name", "value"
}, new String[] { "submit", "find", "Search Freenet!" });
+ }
+
HTMLNode bookmarksList = bookmarkBoxContent.addChild("ul", "id",
"bookmarks");
addCategoryToList(BookmarkManager.MAIN_CATEGORY, bookmarksList,
useragent != null && useragent.contains("khtml") &&
!useragent.contains("chrome"));
_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs