From abf7296de12632833caf93c2644094b215b9f9ba Mon Sep 17 00:00:00 2001 From: z3d Date: Sun, 2 Aug 2009 12:57:50 +0000 Subject: [PATCH] Fix for IE overflow issue; classic theme enhanced; more UI enhancements. --- .../i2p/router/web/ConfigTunnelsHandler.java | 12 +- .../net/i2p/router/web/ConfigUIHandler.java | 4 +- .../net/i2p/router/web/ConfigUIHelper.java | 2 +- apps/routerconsole/jsp/config.jsp | 3 +- apps/routerconsole/jsp/configadvanced.jsp | 4 +- apps/routerconsole/jsp/configclients.jsp | 7 +- apps/routerconsole/jsp/configkeyring.jsp | 10 +- apps/routerconsole/jsp/configlogging.jsp | 4 +- apps/routerconsole/jsp/configpeer.jsp | 4 +- apps/routerconsole/jsp/configstats.jsp | 4 +- apps/routerconsole/jsp/configtunnels.jsp | 4 +- apps/routerconsole/jsp/configupdate.jsp | 3 +- apps/routerconsole/jsp/css.jsp | 1 + history.txt | 6 +- .../themes/console/classic/console.css | 203 +++++++++++++++--- .../themes/console/classic/ieshim.css | 6 + .../themes/console/light/console.css | 5 +- router/java/src/net/i2p/router/JobQueue.java | 4 +- .../src/net/i2p/router/RouterVersion.java | 2 +- .../router/transport/ntcp/NTCPTransport.java | 4 +- .../router/transport/udp/UDPTransport.java | 4 +- .../router/tunnel/pool/TunnelPoolManager.java | 4 +- 22 files changed, 227 insertions(+), 73 deletions(-) create mode 100644 installer/resources/themes/console/classic/ieshim.css diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHandler.java index c7c7c2eb9..0e59380e1 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigTunnelsHandler.java @@ -47,7 +47,7 @@ public class ConfigTunnelsHandler extends FormHandler { boolean saveRequired = false; if (_log.shouldLog(Log.DEBUG)) - _log.debug("Saving changes, with props = " + _settings); + _log.debug("Saving changes, with props = " + _settings + "."); int updated = 0; int index = 0; @@ -67,7 +67,7 @@ public class ConfigTunnelsHandler extends FormHandler { try { client.fromBase64(poolName); } catch (DataFormatException dfe) { - addFormError("Internal error (pool name could not resolve - " + poolName + ")"); + addFormError("Internal error (pool name could not resolve - " + poolName + ")."); index++; continue; } @@ -76,7 +76,7 @@ public class ConfigTunnelsHandler extends FormHandler { } if ( (in == null) || (out == null) ) { - addFormError("Internal error (pool settings cound not be found for " + poolName + ")"); + addFormError("Internal error (pool settings cound not be found for " + poolName + ")."); index++; continue; } @@ -131,14 +131,14 @@ public class ConfigTunnelsHandler extends FormHandler { } if (updated > 0) - addFormNotice("Updated settings for " + updated + " pools"); + addFormNotice("Updated settings for " + updated + " pools."); if (saveRequired) { boolean saved = _context.router().saveConfig(); if (saved) - addFormNotice("Exploratory tunnel configuration saved successfully"); + addFormNotice("Exploratory tunnel configuration saved successfully."); else - addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs"); + addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs."); } } private static final int getInt(Object val) { diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHandler.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHandler.java index 934bb0c88..79ea1d182 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHandler.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHandler.java @@ -24,8 +24,8 @@ public class ConfigUIHandler extends FormHandler { else _context.router().setConfigSetting(CSSHelper.PROP_THEME_NAME, _config); if (_context.router().saveConfig()) - addFormNotice("Theme change successfully saved (refresh page to view)"); + addFormNotice("Theme change successfully saved (refresh page to view)."); else - addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs"); + addFormNotice("Error saving the configuration (applied but not saved) - please see the error logs."); } } diff --git a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHelper.java b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHelper.java index 74f259485..11830975b 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHelper.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/ConfigUIHelper.java @@ -3,7 +3,7 @@ package net.i2p.router.web; public class ConfigUIHelper extends HelperBase { public ConfigUIHelper() {} - private static final String themes[] = {"Classic", "Dark", "Light"}; + private static final String themes[] = {"classic", "dark", "light"}; public String getSettings() { StringBuilder buf = new StringBuilder(512); diff --git a/apps/routerconsole/jsp/config.jsp b/apps/routerconsole/jsp/config.jsp index 8dad41943..b91a1ce24 100644 --- a/apps/routerconsole/jsp/config.jsp +++ b/apps/routerconsole/jsp/config.jsp @@ -30,6 +30,7 @@ I2P will work best if you configure your rates to match the speed of your internet connection.

+

" /> KBps In ()
@@ -49,7 +50,7 @@ -->
Share ()
-
+

<% int share = nethelper.getShareBandwidth(); if (share < 12) { diff --git a/apps/routerconsole/jsp/configadvanced.jsp b/apps/routerconsole/jsp/configadvanced.jsp index f435c68a9..6fe8723dc 100644 --- a/apps/routerconsole/jsp/configadvanced.jsp +++ b/apps/routerconsole/jsp/configadvanced.jsp @@ -16,12 +16,13 @@

<%@include file="confignav.jsp" %> - + " />
+
<% String prev = System.getProperty("net.i2p.router.web.ConfigAdvancedHandler.nonce"); if (prev != null) System.setProperty("net.i2p.router.web.ConfigAdvancedHandler.noncePrev", prev); @@ -38,5 +39,6 @@
+
diff --git a/apps/routerconsole/jsp/configclients.jsp b/apps/routerconsole/jsp/configclients.jsp index 91a2dd8cb..8921987f4 100644 --- a/apps/routerconsole/jsp/configclients.jsp +++ b/apps/routerconsole/jsp/configclients.jsp @@ -35,13 +35,13 @@ button span.hide{

Client Configuration

The Java clients listed below are started by the router and run in the same JVM. -

+

All changes require restart to take effect. To change other client options, edit the clients.config file.


-
+

WebApp Configuration

The Java web applications listed below are started by the webConsole client and run in the same JVM as the router. @@ -53,7 +53,7 @@ button span.hide{ A web app may also be disabled by removing the .war file from the webapps directory; however the .war file and web app will reappear when you update your router to a newer version, so disabling the web app here is the preferred method. -

+

@@ -65,5 +65,6 @@ button span.hide{

+ diff --git a/apps/routerconsole/jsp/configkeyring.jsp b/apps/routerconsole/jsp/configkeyring.jsp index 9363ba04b..7e58f4a15 100644 --- a/apps/routerconsole/jsp/configkeyring.jsp +++ b/apps/routerconsole/jsp/configkeyring.jsp @@ -11,7 +11,7 @@

I2P Keyring Configuration

<%@include file="confignav.jsp" %> - + " /> @@ -26,8 +26,9 @@

Keyring

The router keyring is used to decrypt encrypted leaseSets. The keyring may contain keys for local or remote encrypted destinations. -

-

+

+ +


@@ -40,6 +41,7 @@ Enter keys for encrypted remote destinations here. Keys for local destinations must be entered on the I2PTunnel page.

+

@@ -54,7 +56,7 @@
Dest. name, hash, or full key:
- +
diff --git a/apps/routerconsole/jsp/configlogging.jsp b/apps/routerconsole/jsp/configlogging.jsp index a854b0750..432acdfb8 100644 --- a/apps/routerconsole/jsp/configlogging.jsp +++ b/apps/routerconsole/jsp/configlogging.jsp @@ -13,7 +13,7 @@

I2P Logging Configuration

<%@include file="confignav.jsp" %> - + " /> @@ -26,6 +26,7 @@ " />

Configure I2P Logging Options

+
"); buf.append("\n"); - buf.append("
Logging filename: @@ -64,5 +65,6 @@ + diff --git a/apps/routerconsole/jsp/configpeer.jsp b/apps/routerconsole/jsp/configpeer.jsp index 4cf9c7bdb..debe2676b 100644 --- a/apps/routerconsole/jsp/configpeer.jsp +++ b/apps/routerconsole/jsp/configpeer.jsp @@ -69,15 +69,15 @@

- " />
+
- +
diff --git a/apps/routerconsole/jsp/configstats.jsp b/apps/routerconsole/jsp/configstats.jsp index cf4bd8dc4..9a2435ec4 100644 --- a/apps/routerconsole/jsp/configstats.jsp +++ b/apps/routerconsole/jsp/configstats.jsp @@ -56,7 +56,7 @@ function toggleAll(category)

I2P Stats Configuration

<%@include file="confignav.jsp" %> - + " /> @@ -78,6 +78,7 @@ function toggleAll(category) (change requires restart to take effect)
Stat file:
Filter: (toggle all)
+
<% while (statshelper.hasMoreStats()) { while (statshelper.groupRequired()) { %> @@ -105,5 +106,6 @@ function toggleAll(category)
+ diff --git a/apps/routerconsole/jsp/configtunnels.jsp b/apps/routerconsole/jsp/configtunnels.jsp index cc5e3389f..f6ccb44d7 100644 --- a/apps/routerconsole/jsp/configtunnels.jsp +++ b/apps/routerconsole/jsp/configtunnels.jsp @@ -14,7 +14,6 @@

I2P Tunnel Configuration

<%@include file="confignav.jsp" %> - " /> " /> @@ -31,7 +30,7 @@ High CPU and/or high outbound bandwidth usage may result. Change these settings with care, and adjust them if you have problems.

- +
<% String prev = System.getProperty("net.i2p.router.web.ConfigTunnelsHandler.nonce"); if (prev != null) System.setProperty("net.i2p.router.web.ConfigTunnelsHandler.noncePrev", prev); @@ -46,5 +45,6 @@
+ diff --git a/apps/routerconsole/jsp/configupdate.jsp b/apps/routerconsole/jsp/configupdate.jsp index 80cbbf04d..d82600da2 100644 --- a/apps/routerconsole/jsp/configupdate.jsp +++ b/apps/routerconsole/jsp/configupdate.jsp @@ -28,7 +28,7 @@ System.setProperty("net.i2p.router.web.ConfigUpdateHandler.nonce", new java.util.Random().nextLong()+""); %> " />

Check for I2P and news updates

- +
@@ -70,6 +70,7 @@
+ diff --git a/apps/routerconsole/jsp/css.jsp b/apps/routerconsole/jsp/css.jsp index 60db06835..37b649780 100644 --- a/apps/routerconsole/jsp/css.jsp +++ b/apps/routerconsole/jsp/css.jsp @@ -18,3 +18,4 @@ " /> console.css" rel="stylesheet" type="text/css" /> + \ No newline at end of file diff --git a/history.txt b/history.txt index b5509a770..e50e75d28 100644 --- a/history.txt +++ b/history.txt @@ -1,8 +1,12 @@ +2009-08-02 + * Better support for Internet Explorer/classic theme. + * Incremental improvements to classic theme. + * More UI tweaks and fiddles. + 2009-07-31 dr|z3d * Resolve anomalous buttons and text fields in console ui. * Enhance presentation of data in /peers.jsp. * Fix themes issue with horizontal width of radio/checkbox icons. - (Radioboxes currently non-functional in Opera). * Other cosmetic UI enhancements. * 2009-07-31 0.7.6 released diff --git a/installer/resources/themes/console/classic/console.css b/installer/resources/themes/console/classic/console.css index 5cd5ceb85..9ed070e12 100644 --- a/installer/resources/themes/console/classic/console.css +++ b/installer/resources/themes/console/classic/console.css @@ -1,10 +1,13 @@ body { - margin: 1em 0em; - padding: 0em; + margin: 15px 0; + padding: 0; text-align: left; background: #FFF; color: #000; - font: 10pt/120% Verdana, Tahoma, Helvetica, sans-serif; +/* + font: 10pt/140% Verdana, Tahoma, Helvetica, sans-serif; +*/ + font: 10pt/140% "Lucida Sans Unicode", "Bitstream Vera Sans", Verdana, Tahoma, Helvetica, sans-serif; } .hide { @@ -16,8 +19,9 @@ img { } pre { + overflow: auto; + font-size: 8pt !important; width: 100%; - overflow-x: scroll; } div.logo { @@ -37,25 +41,25 @@ div.toolbar { } div.routersummaryouter { - float: left; + float: left; width: 200px; margin: 0; padding: 0; border: 0; - clear: left;/* fixes a bug in Opera */ - overflow: auto; + clear: left; /* fixes a bug in Opera */ } div.routersummary { background: #fafaff; - width: 175px; + width: 180px; color: inherit; - margin: 0em; - padding: 5px; - text-align: left; - border: medium solid #efefff; + margin: 0; + padding: 5px 0 0 10px; + text-align: left !important; + border: 5px solid #efefff; font-size: 9pt; word-wrap: break-word; + font: 9pt/125%; } div.routersummary hr { @@ -63,11 +67,16 @@ div.routersummary hr { background: #ccf; height: 2px; border: 0px solid #ccf; - margin: 10px 0; + margin: 4px 0; } + +div.routersummary p { + padding: 0; +} + div.warning { - margin: 0em 1em 1em 224px; - padding: .5em 1em; + margin: 0 10px 10px 205px; + padding: 5px 10px; background: #ffefef; border: medium solid #ffafaf; text-align: left; @@ -75,40 +84,63 @@ div.warning { } div.main { - margin: 0em 1em 1em 224px; - padding: .5em 1em; + margin: 0 20px 10px 205px; + padding: 5px 15px 15px 15px; background: #ffffef; - border: medium solid #ffffd0; + border: 5px solid #ffffd0; text-align: left; color: inherit; } + div.main textarea { - width: 100% !important; +/* width: 100% !important; breaks IE */ + width: 600px; } div.news { - margin: 0em 1em 1em 224px; - padding: .5em 1em; + margin: 0 20px 0 205px; + padding: -10px 15px 5px 15px; background: #ffffc0; - border: medium solid #ffffa0; + border: 5px solid #ffffa0; text-align: justify; color: inherit; } +div.news li { + text-align: justify; + list-style: none; + margin: -10px 20px -20px -20px; + padding: 8px 0; + border: 1px solid #330; + border-left: 5px solid #330; + padding: 3px 5px 3px 5px; + background: #fe7; + font-size: 12pt; +} + +div.news a:link { + +} + div.confignav { - padding: 1em; - background: #efefff; + padding: 12px 0 15px 0; + background: #cfc; + margin: -10px -20px 0 -10px; + border: 5px solid #9f9; } div.configure { - padding: 1em; + margin: 0 -20px 0 -10px; + padding: 10px 20px 5px 20px; background: #ffffc0; } div.messages { - padding: 1em; + padding: 10px; background: #fafaff; + border: 5px solid #fdd; + margin: 0px -20px 0px -10px; } div.messages span.error { @@ -122,21 +154,37 @@ div.messages span.notice { h1 { font-size: 18pt; text-align: center; + border: 5px solid #efefff; + border-bottom: 5px solid #efefff; + padding: 10px; + margin: 0 20px 0 205px; + line-height: 93%; + text-transform: uppercase; + letter-spacing: 0.3em; + background: #fff; } h2 { - font-size: 12pt; + font-size: 14pt; + padding: 10px; + border-bottom: 2px solid #001; + border-top: 2px solid #001; + letter-spacing: 0.04em; } h3 { - font-size: 10pt; + font-size: 12pt; + padding: 10px; + border-bottom: 2px solid #001; + border-top: 2px solid #001; + letter-spacing: 0.04em; } + .proxyfooter{ font-size: 7pt; display: none !important; } - table { /* border-collapse: collapse; */ border: 5px solid #dfd; @@ -144,12 +192,13 @@ table { cell-padding: 1px; font-size: 7pt; background: #fff; + width: 100%; } - th { background-color: #ccf; padding: 5px 2px; + text-align: center; } tt { @@ -169,11 +218,11 @@ tr:nth-child(odd) { } hr { - color: #ff9; - background: #ff9; + color: #dd9; + background: #dd9; height: 2px; - border: 0px solid #ff9; - margin: 10px 0; + border: 0px solid #dd5; + margin: 5px 0; } .statusnotes { @@ -183,4 +232,88 @@ hr { text-align: center; margin: -3px 0 0 0; background: #fff; - } \ No newline at end of file + } + +input { + margin: 3px 5px 3px 0; + vertical-align: middle; +} + +select { + margin: 3px 5px 3px 0; + vertical-align: middle; +} + +submit { + padding 0 2px; +} + +p { + padding: 5px 20px 0px 20px; + text-align: justify; +} + +.formaction { + text-align: right; +} + +.langbox { + margin: 30px 0 0px 5px; + color: #001; + font-size: 7pt; + width: 180px; + text-align: center; + float: right; + valign: middle; +} + +.langbox img { + padding: 0 2px; /* Ignored by IE8 */ +} + +a:link{ + color: #006; + text-decoration: none; + font-weight: bold; + word-wrap: break-word; +} + +a:visited{ + color: #448; + text-decoration: none; + font-weight: bold; +} + +a:hover{ + color: #f60; + text-decoration: underline; + font-weight: bold; +} + +a:active{ + color: #f93; + text-decoration: underline; + font-weight: bold; +} + +pre { + font-size: 9pt; + margin: 0px 20px; +} + +tt { + font-size: 9pt; + font-weight: bold; + color: darkgreen; +} + +.tablefooter { + border: 1px solid #f00; +} + +.tablefooter tr, .tablefooter td { + background: #aaf; + font-size: 8pt; + font-weight: bold; + line-height: 150%; +} \ No newline at end of file diff --git a/installer/resources/themes/console/classic/ieshim.css b/installer/resources/themes/console/classic/ieshim.css new file mode 100644 index 000000000..0e47dae15 --- /dev/null +++ b/installer/resources/themes/console/classic/ieshim.css @@ -0,0 +1,6 @@ +/* Welcome to the wonderful world of kludgey IE fixes */ + +.wideload { + overflow: auto; + width: 100%; +} \ No newline at end of file diff --git a/installer/resources/themes/console/light/console.css b/installer/resources/themes/console/light/console.css index d87217c98..20d8c28cf 100644 --- a/installer/resources/themes/console/light/console.css +++ b/installer/resources/themes/console/light/console.css @@ -19,7 +19,7 @@ img { pre { width: 98%; - overflow-x: scroll; + overflow: auto; text-align: left; font: 8pt "Lucida Console", "DejaVu Sans Mono", Courier, mono; color: #333; @@ -130,7 +130,6 @@ div.main { text-align: left; color: #001; width: auto; -/* overflow-x: scroll; */ } div.main hr, hr { @@ -652,7 +651,7 @@ form {} -khtml-border-radius: 4px; text-align: justify; -moz-box-shadow: inset 0px 0px 1px 0px #002; - overflow-x: scroll; + overflow: auto; } div.joblog:li { diff --git a/router/java/src/net/i2p/router/JobQueue.java b/router/java/src/net/i2p/router/JobQueue.java index 6adcc4b3e..af58277ca 100644 --- a/router/java/src/net/i2p/router/JobQueue.java +++ b/router/java/src/net/i2p/router/JobQueue.java @@ -607,7 +607,7 @@ public class JobQueue { out.flush(); StringBuilder buf = new StringBuilder(32*1024); - buf.append("

I2P JobQueue

# runners: ").append(numRunners).append(" [states="); + buf.append("

I2P JobQueue

# runners: ").append(numRunners).append(" [states="); if (states != null) for (int i = 0; i < states.length; i++) buf.append(states[i]).append(" "); @@ -734,6 +734,6 @@ public class JobQueue { buf.append("
").append(minPendingTime).append("
\n"); + buf.append("
\n"); } } diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 79a99b76c..f23327089 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 04; + public final static long BUILD = 05; /** for example "-test" */ public final static String EXTRA = ""; public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA; diff --git a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java index a21ad2790..b21156f1c 100644 --- a/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java +++ b/router/java/src/net/i2p/router/transport/ntcp/NTCPTransport.java @@ -643,7 +643,7 @@ public class NTCPTransport extends TransportImpl { buf.append(". Limit: ").append(getMaxConnections()); buf.append(". Timeout: ").append(DataHelper.formatDuration(_pumper.getIdleTimeout())); buf.append(".\n"); - buf.append("\n"); + buf.append("
\n"); buf.append(""); buf.append(""); buf.append(""); @@ -727,7 +727,7 @@ public class NTCPTransport extends TransportImpl { buf.append("\n"); } - buf.append("
PeerDirIdle

\n"); + buf.append("

\n"); out.write(buf.toString()); buf.setLength(0); } diff --git a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java index 2d38730ae..044b33b8e 100644 --- a/router/java/src/net/i2p/router/transport/udp/UDPTransport.java +++ b/router/java/src/net/i2p/router/transport/udp/UDPTransport.java @@ -1767,7 +1767,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority buf.append(". Limit: ").append(getMaxConnections()); buf.append(". Timeout: ").append(DataHelper.formatDuration(_expireTimeout)); buf.append(".\n"); - buf.append("\n"); + buf.append("
\n"); buf.append("\n"); buf.append(" \n"); - buf.append("
Peer"); if (sortFlags != FLAG_ALPHA) buf.append(" V "); @@ -1998,7 +1998,7 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority buf.append(sendTotal).append(" ").append(recvTotal).append("").append(resentTotal); buf.append(" ").append(dupRecvTotal).append("

\n"); + buf.append("

\n"); long bytesTransmitted = _context.bandwidthLimiter().getTotalAllocatedOutboundBytes(); // NPE here early double averagePacketSize = _context.statManager().getRate("udp.sendPacketSize").getLifetimeAverageValue(); diff --git a/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java b/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java index 70b869b55..7ffbac578 100644 --- a/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java +++ b/router/java/src/net/i2p/router/tunnel/pool/TunnelPoolManager.java @@ -405,7 +405,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { public void renderStatusHTML(Writer out) throws IOException { - out.write("

Exploratory tunnels (config):

\n"); + out.write("

Exploratory tunnels (config):

\n"); renderPool(out, _inboundExploratory, _outboundExploratory); List destinations = null; @@ -623,7 +623,7 @@ public class TunnelPoolManager implements TunnelManagerFacade { } out.write(" Tunnels " + tunnelCount); out.write("   " + partCount); - out.write("  \n"); + out.write("  
\n"); } /** @return total number of non-fallback expl. + client tunnels */