merge of '3b23dcff9410a7f2e8443cdaa410ead6d9694f29'

and 'fd87a1b95a60a0e5c18d75aed057344e8ce5aa87'
This commit is contained in:
z3d
2009-07-16 00:10:58 +00:00
11 changed files with 86 additions and 41 deletions

View File

@ -8,6 +8,7 @@ public class CSSHelper extends HelperBase {
public CSSHelper() {}
public static final String PROP_THEME_NAME = "routerconsole.theme";
public static final String DEFAULT_THEME = "light";
private static final String BASE = "/themes/console/";
private static final String FORCE = "classic";
@ -16,9 +17,8 @@ public class CSSHelper extends HelperBase {
if (userAgent != null && userAgent.contains("MSIE")) {
url += FORCE + "/";
} else {
String theme = _context.getProperty(PROP_THEME_NAME);
if (theme != null)
url += theme + "/";
String theme = _context.getProperty(PROP_THEME_NAME, DEFAULT_THEME);
url += theme + "/";
}
return url;
}

View File

@ -3,12 +3,11 @@ package net.i2p.router.web;
public class ConfigUIHelper extends HelperBase {
public ConfigUIHelper() {}
public static final String PROP_THEME = "routerconsole.theme";
private static final String themes[] = {"classic", "dark", "light"};
public String getSettings() {
StringBuilder buf = new StringBuilder(512);
String current = _context.getProperty(PROP_THEME, "default");
String current = _context.getProperty(CSSHelper.PROP_THEME_NAME, CSSHelper.DEFAULT_THEME);
for (String theme : themes) {
buf.append("<input type=\"radio\" name=\"theme\" ");
if (theme.equals(current))