Author: toad
Date: 2007-11-19 20:30:03 +0000 (Mon, 19 Nov 2007)
New Revision: 15854
Modified:
trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
Log:
Use tables and a small amount of icky explicit CSS to separate the activelink
from the text and make them line up
Modified: trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java
===================================================================
--- trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java 2007-11-19
19:57:54 UTC (rev 15853)
+++ trunk/freenet/src/freenet/clients/http/WelcomeToadlet.java 2007-11-19
20:30:03 UTC (rev 15854)
@@ -72,16 +72,23 @@
private void addCategoryToList(BookmarkCategory cat, HTMLNode list)
{
BookmarkItems items = cat.getItems();
+ if(items.size() > 0) {
+ // FIXME CSS noborder ...
+ HTMLNode table = list.addChild("li").addChild("table", new
String[] { "border", "style" }, new String[] { "0", "border: none" });
for(int i = 0; i < items.size(); i++) {
- BookmarkItem item = items.get(i);
- HTMLNode li = list.addChild("li", "class","item");
- HTMLNode a = li.addChild("a", "href", '/' +
item.getKey());
- if(item.hasAnActivelink()) {
- a.addChild("img", new String[] { "src", "height",
"width", "alt"},
- new String[] { '/' + item.getKey() +
"/activelink.png", "36px", "108px", "activelink"});
- }
- a.addChild("#", " " + item.getName());
+ BookmarkItem item = items.get(i);
+ HTMLNode row = table.addChild("tr");
+ HTMLNode cell = row.addChild("td", "style", "border:
none");
+ if(item.hasAnActivelink()) {
+ cell.addChild("a", "href", '/' + item.getKey())
+ .addChild("img", new String[] { "src", "height",
"width", "alt"},
+ new String[] { '/' + item.getKey() +
"/activelink.png", "36px", "108px", "activelink"});
+ } else
+ cell.addChild("#", " ");
+ cell = row.addChild("td", "style", "border: none");
+ cell.addChild("a", "href", '/' + item.getKey(),
item.getName());
}
+ }
BookmarkCategories cats = cat.getSubCategories();
for (int i = 0; i < cats.size(); i++) {