Changeset 0f1a4ad


Ignore:
Timestamp:
Jul 10, 2009 1:38:09 PM (11 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
e513911
Parents:
1965815
Message:
  • Console: Force IE to the classic theme
Location:
apps/routerconsole
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/CSSHelper.java

    r1965815 r0f1a4ad  
    1010    public static final String PROP_THEME_NAME = "routerconsole.theme";
    1111    private static final String BASE = "/themes/console/";
     12    private static final String FORCE = "classic";
    1213
    13     public String getTheme() {
     14    public String getTheme(String userAgent) {
    1415        String url = BASE;
    15         String theme = _context.getProperty(PROP_THEME_NAME);
    16         if (theme != null)
    17             url += theme + "/";
     16        if (userAgent != null && userAgent.contains("MSIE")) {
     17            url += FORCE + "/";
     18        } else {
     19            String theme = _context.getProperty(PROP_THEME_NAME);
     20            if (theme != null)
     21                url += theme + "/";
     22        }
    1823        return url;
    1924    }
  • apps/routerconsole/jsp/css.jsp

    r1965815 r0f1a4ad  
    1818<jsp:useBean class="net.i2p.router.web.CSSHelper" id="cssHelper" scope="request" />
    1919<jsp:setProperty name="cssHelper" property="contextId" value="<%=(String)session.getAttribute("i2p.contextId")%>" />
    20 <link href="<%=cssHelper.getTheme()%>console.css" rel="stylesheet" type="text/css" />
     20<link href="<%=cssHelper.getTheme(request.getHeader("User-Agent"))%>console.css" rel="stylesheet" type="text/css" />
Note: See TracChangeset for help on using the changeset viewer.