Remove hard-coded styling that will be moved to CSS

This commit is contained in:
str4d
2016-05-01 01:28:49 +00:00
parent 1ad69e7127
commit 82c55e6008
8 changed files with 15 additions and 31 deletions

View File

@@ -55,9 +55,7 @@ public class ConfigNavHelper extends HelperBase {
*/
public void renderNavBar(String requestURI, boolean graphical) throws IOException {
StringBuilder buf = new StringBuilder(1024);
// TODO fix up the non-light themes
String theme = _context.getProperty(CSSHelper.PROP_THEME_NAME);
boolean span = graphical && (theme == null || theme.equals(CSSHelper.DEFAULT_THEME));
boolean span = graphical;
if (!span)
buf.append("<center>");
List<Tab> tabs = new ArrayList<Tab>(pages.length);
@@ -79,9 +77,9 @@ public class ConfigNavHelper extends HelperBase {
buf.append("<a href=\"").append(page).append("\">").append(tabs.get(i).title).append("</a>");
}
if (span)
buf.append(" </span>\n");
buf.append("</span>\n");
else if (i != pages.length - 1)
buf.append(" |\n");
buf.append("&nbsp;&nbsp;\n");
}
if (!span)
buf.append("</center>");

View File

@@ -210,25 +210,21 @@ public class ConfigNetHelper extends HelperBase {
}
}
StringBuilder buf = new StringBuilder(128);
buf.append("<div class=\"indent\">");
for (String addr : addrs) {
buf.append("\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<input type=\"checkbox\" class=\"optbox\" value=\"foo\" name=\"addr_");
buf.append("<input type=\"checkbox\" class=\"optbox\" value=\"foo\" name=\"addr_");
buf.append(addr);
buf.append('"');
if (addrs.size() == 1 || configs.contains(addr))
buf.append(CHECKED);
buf.append("> ");
buf.append(addr);
buf.append("<br>");
buf.append("<br>\n");
}
buf.append("\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
if (!addrs.isEmpty()) {
buf.append(_t("Add host name or IP"))
.append(": ");
}
buf.append("<input name=\"udpHost1\" type=\"text\" size=\"16\" >" +
"</div>");
buf.append("<input name=\"udpHost1\" type=\"text\" size=\"16\" >");
return buf.toString();
}

View File

@@ -116,9 +116,7 @@ public class NetDbHelper extends HelperBase {
private void renderNavBar() throws IOException {
StringBuilder buf = new StringBuilder(1024);
buf.append("<div class=\"confignav\" id=\"confignav\">");
// TODO fix up the non-light themes
String theme = _context.getProperty(CSSHelper.PROP_THEME_NAME);
boolean span = _graphical && (theme == null || theme.equals(CSSHelper.DEFAULT_THEME));
boolean span = _graphical;
if (!span)
buf.append("<center>");
int tab = getTab();
@@ -139,9 +137,9 @@ public class NetDbHelper extends HelperBase {
buf.append("<a href=\"netdb").append(links[i]).append("\">").append(_t(titles[i])).append("</a>");
}
if (span)
buf.append(" </span>\n");
buf.append("</span>\n");
else if (i != titles.length - 1)
buf.append(" |\n");
buf.append("&nbsp;&nbsp;\n");
}
if (!span)
buf.append("</center>");

View File

@@ -9,7 +9,7 @@ public class ProfilesHelper extends HelperBase {
private static final String titles[] =
{_x("High Capacity"), // 0
_x("Floodfill "), // 1
_x("Floodfill"), // 1
_x("Banned"), // 2
_x("All"), }; // 3
@@ -93,9 +93,7 @@ public class ProfilesHelper extends HelperBase {
private void renderNavBar() throws IOException {
StringBuilder buf = new StringBuilder(1024);
buf.append("<div class=\"confignav\" id=\"confignav\">");
// TODO fix up the non-light themes
String theme = _context.getProperty(CSSHelper.PROP_THEME_NAME);
boolean span = _graphical && (theme == null || theme.equals(CSSHelper.DEFAULT_THEME));
boolean span = _graphical;
if (!span)
buf.append("<center>");
int tab = getTab();
@@ -112,9 +110,9 @@ public class ProfilesHelper extends HelperBase {
buf.append("<a href=\"profiles").append(links[i]).append("\">").append(_t(titles[i])).append("</a>");
}
if (span)
buf.append(" </span>\n");
buf.append("</span>\n");
else if (i != titles.length - 1)
buf.append(" |\n");
buf.append("&nbsp;&nbsp;\n");
}
if (!span)
buf.append("</center>");

View File

@@ -997,8 +997,7 @@ public class SummaryHelper extends HelperBase {
"<input type=\"submit\" name=\"action\" class=\"delete\" value=\"")
.append(_t("Delete selected"))
.append("\"></td><td align=\"left\"><b>")
.append(_t("Add")).append(":</b> " +
"<select name=\"name\">\n" +
.append("<select name=\"name\">\n" +
"<option value=\"\" selected=\"selected\">")
.append(_t("Select a section to add"))
.append("</option>\n");

View File

@@ -28,8 +28,6 @@
<h3 id="bwlimiter" class="tabletitle"><%=intl._t("Bandwidth limiter")%></h3>
<table id="bandwidthconfig" class="configtable">
<tr><td class="infohelp" colspan="2">
<!-- TODO: move to css -->
<img src="/themes/console/images/itoopie_xsm.png" alt="">
<b><%=intl._t("I2P will work best if you configure your rates to match the speed of your internet connection.")%></b>
</td></tr>
<tr><td><input style="text-align: right; width: 5em;" name="inboundrate" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="inboundRate" />" >

View File

@@ -35,8 +35,7 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
<%=intl._t("All changes require restart to take effect.")%>
</p>
<p class="infowarn" id="clientconf">
<!-- TODO use css background -->
<img src="/themes/console/images/itoopie_xsm.png" alt=""><b><%=intl._t("Be careful changing any settings here. The 'router console' and 'application tunnels' are required for most uses of I2P. Only advanced users should change these.")%></b>
<b><%=intl._t("Be careful changing any settings here. The 'router console' and 'application tunnels' are required for most uses of I2P. Only advanced users should change these.")%></b>
</p><div class="wideload">
<form action="" method="POST">
<input type="hidden" name="nonce" value="<%=pageNonce%>" >

View File

@@ -26,8 +26,6 @@
<table id="netconfig" class="configtable">
<tr>
<td class="infohelp">
<!-- TODO replace static img with css background -->
<img src="/themes/console/images/itoopie_xsm.png" alt="">
<b><%=intl._t("The default settings will work for most people.")%>
<a href="#chelp"><%=intl._t("There is help below.")%></a></b>
<%=intl._t("Changing these settings will restart your router.")%>