I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 0f1a4ad4 authored by zzz's avatar zzz
Browse files

* Console: Force IE to the classic theme

parent 1965815d
No related branches found
No related tags found
No related merge requests found
......@@ -9,12 +9,17 @@ public class CSSHelper extends HelperBase {
public static final String PROP_THEME_NAME = "routerconsole.theme";
private static final String BASE = "/themes/console/";
private static final String FORCE = "classic";
public String getTheme() {
public String getTheme(String userAgent) {
String url = BASE;
String theme = _context.getProperty(PROP_THEME_NAME);
if (theme != null)
url += theme + "/";
if (userAgent != null && userAgent.contains("MSIE")) {
url += FORCE + "/";
} else {
String theme = _context.getProperty(PROP_THEME_NAME);
if (theme != null)
url += theme + "/";
}
return url;
}
}
......@@ -17,4 +17,4 @@
%>
<jsp:useBean class="net.i2p.router.web.CSSHelper" id="cssHelper" scope="request" />
<jsp:setProperty name="cssHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
<link href="<%=cssHelper.getTheme()%>console.css" rel="stylesheet" type="text/css" />
<link href="<%=cssHelper.getTheme(request.getHeader("User-Agent"))%>console.css" rel="stylesheet" type="text/css" />
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment