Changeset edb3ffcf


Ignore:
Timestamp:
May 1, 2016 4:06:28 AM (4 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
5029123
Parents:
e34f044
Message:

Rework /configui forms for theming

Location:
apps/routerconsole
Files:
2 edited

Legend:

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

    re34f044 redb3ffcf  
    1414        Set<String> themes = themeSet();
    1515        for (String theme : themes) {
    16             buf.append("<input type=\"radio\" class=\"optbox\" name=\"theme\" ");
     16            buf.append("<div class=\"themechoice\">")
     17               .append("<input type=\"radio\" class=\"optbox\" name=\"theme\" ");
    1718            if (theme.equals(current))
    1819                buf.append(CHECKED);
    19             buf.append("value=\"").append(theme).append("\">").append(_t(theme)).append("<br>\n");
     20            buf.append("value=\"").append(theme).append("\">")
     21               .append("<object height=\"48\" width=\"48\" data=\"/themes/console/").append(theme).append("/images/thumbnail.png\">")
     22               .append("<img height=\"48\" width=\"48\" alt=\"\" src=\"/themes/console/images/thumbnail.png\">")
     23               .append("</object><br>")
     24               .append("<div class=\"themelabel\">").append(_t(theme)).append("</div>")
     25               .append("</div>\n");
    2026        }
    2127        boolean universalTheming = _context.getBooleanProperty(CSSHelper.PROP_UNIVERSAL_THEMING);
     
    143149                continue;
    144150            // we use "lang" so it is set automagically in CSSHelper
    145             buf.append("<input type=\"radio\" class=\"optbox\" name=\"lang\" ");
     151            buf.append("<div class=\"langselect\"><input type=\"radio\" class=\"optbox\" name=\"lang\" ");
    146152            if (lang.equals(current))
    147153                buf.append(CHECKED);
    148154            buf.append("value=\"").append(lang).append("\">")
    149                .append("<img height=\"11\" width=\"16\" alt=\"\" src=\"/flags.jsp?c=").append(langs[i][1]).append("\"> ");
     155               .append("<img height=\"11\" width=\"16\" alt=\"\" src=\"/flags.jsp?c=").append(langs[i][1]).append("\">")
     156               .append("<div class=\"ui_lang\">");
    150157            int under = lang.indexOf('_');
    151158            String slang = (under > 0) ? lang.substring(0, under) : lang;
     
    157164                   .append(')');
    158165            }
    159             buf.append("<br>\n");
     166            buf.append("</div></div>\n");
    160167        }
    161168        return buf.toString();
     
    176183               .append(_t("Remove"))
    177184               .append("</th><th>")
    178                .append(_t("User Name"))
     185               .append(_t("Username"))
    179186               .append("</th><th>&nbsp;</th></tr>\n");
    180187            for (String name : userpw.keySet()) {
     
    186193            }
    187194        }
    188         buf.append("<tr><td align=\"center\"><b>")
    189            .append(_t("Add")).append(":</b>" +
    190                    "</td><td align=\"left\"><input type=\"text\" name=\"name\">" +
    191                    "</td><td align=\"left\"><b>");
    192         buf.append(_t("Password")).append(":</b> " +
    193                    "<input type=\"password\" size=\"40\" name=\"nofilter_pw\"></td></tr>" +
    194                    "</table>\n");
     195        buf.append("<tr><td id=\"pw_adduser\" align=\"left\" colspan=\"3\"><b>")
     196           .append("<b>").append(_t("Username")).append(":</b> ")
     197           .append("<input type=\"text\" name=\"name\">")
     198           .append("<b>").append(_t("Password")).append(":</b> ")
     199           .append("<input type=\"password\" size=\"40\" name=\"nofilter_pw\">")
     200           .append("</td></tr>")
     201           .append("</table>\n");
    195202        return buf.toString();
    196203    }
  • apps/routerconsole/jsp/configui.jsp

    re34f044 redb3ffcf  
    3232<h3 id="themeheading"><%=uihelper._t("Router Console Theme")%></h3>
    3333 <form action="" method="POST">
    34 <div id ="themesettings">
    3534 <input type="hidden" name="consoleNonce" value="<%=net.i2p.router.web.CSSHelper.getNonce()%>" >
    3635 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
    3736 <input type="hidden" name="action" value="blah" >
     37<div id ="themesettings">
    3838<%
    3939 String userAgent = request.getHeader("User-Agent");
     
    4747<% } %>
    4848 <jsp:getProperty name="uihelper" property="forceMobileConsole" />
    49 </div>
     49<hr><div class="formaction" id="themeui">
     50<input type="reset" class="cancel" value="<%=intl._t("Cancel")%>" >
     51<input type="submit" name="shouldsave" class="accept" value="<%=intl._t("Apply")%>" >
     52</div></div></form>
    5053<h3 id="langheading"><%=uihelper._t("Router Console Language")%></h3>
     54 <form action="" method="POST">
     55 <input type="hidden" name="consoleNonce" value="<%=net.i2p.router.web.CSSHelper.getNonce()%>" >
     56 <input type="hidden" name="nonce" value="<%=pageNonce%>" >
     57 <input type="hidden" name="action" value="blah" >
    5158<div id="langsettings">
    5259<jsp:getProperty name="uihelper" property="langSettings" />
Note: See TracChangeset for help on using the changeset viewer.