FELIX-1988 Apply 17.finishing_touches.patch by Valentin Valchev (thanks)

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@911782 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java b/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
index 9c6ad26..2d4a601 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
@@ -541,29 +541,27 @@
                 {
                     if ( linkToCurrent )
                     {
-                        map.put( labelMapEntry.getValue(), "<a class='technavat' href='" + appRoot + "/"
-                            + labelMapEntry.getKey() + "'>" + labelMapEntry.getValue() + "</a>" );
+                        map.put( labelMapEntry.getValue(), "<div class='ui-state-active'><a href='" + appRoot + "/"
+                                + labelMapEntry.getKey() + "'>" + labelMapEntry.getValue() + "</a></div>");
                     }
                     else
                     {
-                        map.put( labelMapEntry.getValue(), "<span class='technavat'>" + labelMapEntry.getValue()
-                            + "</span>" );
+                        map.put( labelMapEntry.getValue(), "<div class='ui-state-active'><span>" + labelMapEntry.getValue() 
+                            + "</span></div>");
                     }
                 }
                 else
                 {
-                    map.put( labelMapEntry.getValue(), "<a href='" + appRoot + "/" + labelMapEntry.getKey() + "'>"
-                        + labelMapEntry.getValue() + "</a>" );
+                    map.put( labelMapEntry.getValue(), "<div class='ui-state-default'><a href='" + appRoot + "/" + labelMapEntry.getKey() + "'>" 
+                        + labelMapEntry.getValue() + "</a></div>");
                 }
             }
 
             // render the navigation
-            pw.println( "<div id='technav'>" );
+            pw.println("<div id='technav' class='ui-widget ui-widget-header'>");
             for ( Iterator li = map.values().iterator(); li.hasNext(); )
             {
-                pw.print( "<div class='technavitem'>" );
-                pw.print( li.next() );
-                pw.println( "</div>" );
+                pw.println( li.next() );
             }
             pw.println( "</div>" );
         }
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
index c6601f4..ad44b26 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ConfigurationRender.java
@@ -46,7 +46,7 @@
 
     private static final String LABEL = "config";
     private static final String TITLE = "Configuration Status";
-    private static final String[] CSS_REFS = { "res/ui/configurationrender.css" };
+    private static final String[] CSS_REFS = null;
 
     /**
      * Formatter pattern to generate a relative path for the generation
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java
index e0c5d7f..4b35993 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ShellServlet.java
@@ -24,6 +24,7 @@
 import java.io.PrintStream;
 import java.io.PrintWriter;
 import java.io.StringWriter;
+import java.net.URLDecoder;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
@@ -73,6 +74,7 @@
         try
         {
             String command = request.getParameter( "command" );
+            if (command != null) command = URLDecoder.decode(command);
 
             pw.print( "<span class=\"consolecommand\">-&gt; " );
             pw.print( command == null ? "" : WebConsoleUtil.escapeHtml( command ) );
diff --git a/webconsole/src/main/resources/res/ui/webconsole.css b/webconsole/src/main/resources/res/ui/webconsole.css
index c24d03f..3d97606 100644
--- a/webconsole/src/main/resources/res/ui/webconsole.css
+++ b/webconsole/src/main/resources/res/ui/webconsole.css
@@ -25,115 +25,114 @@
  *      the plugin in the renderContent (or service) method
  *
  * See also http://felix.apache.org/site/branding-the-web-console.html
- */
-
+ */ 
 #main {
-    font-family: Verdana, Arial, Helvetica, sans-serif;
-    font-size: 10px;
-    color: black;
-    background-color: white;
-    border-collapse: collapse;
-    padding: 0px;
-    margin: 30px;
-    position: absolute;
-    text-align: left;
-    border-color: black;
+	width: 90% !important;
+	margin-left: 5%;
 }
+#main img { border: none }
 
+
+/* LOGO & BRANDING */
 #lead {
-    color: #00678C;
-    /* color: #ffffff; */
-    margin: 0px 0px 26px 0px;
-    padding: 0px;
-    height: 100px;
+	padding-top: 10px;
+	margin: 0;
+	height: 73px; /* must be the same as logo (#lead p) height */
+}
+#lead h1 { /* This contains the page title */
+	font-size: 26px;
+	font-weight: bold;
+	float: left;
+}
+#lead p { /* This contains the logo */
+	float: right;
+	height: 73px; /* must be the same as #lead height */
 }
 
-/* This contains the page title */
-#lead h1 {
-    margin: 0px;
-    padding: 5px 0 0 8px;
-    font-size: 300%;
-    font-weight: bold;
-    line-height: 120%;
-    /* account for 5px top padding to get a total of 100px */
-    height: 95px;
-    float: left;
-}
 
-#lead br {
-    line-height: 20px;
-}
-
-/* This contains the logo */
-#lead p {
-    margin: 0px;
-    padding: 0px;
-    height: 100px;
-    position:absolute;
-    right: 0px;
-}
-
-/* This contains the top navigation */
+/* TOP NAVIGATION */
 #technav {
-    border-bottom: 1px solid #6181A9;
-    border-top: 1px solid #6181A9;
-    color: black;
-    font-size: 10px;
-    font-weight: bold;
-    line-height: 21px;
-    padding: 0;
-    margin: 0;
+	font-size: 10px;
+	line-height: 21px;
+	padding: 0;
+	margin: 0;
 }
-
-#technav a {
-    text-decoration: none;
-    padding: 3px 10px 3px 10px;
-    color: #6181A9;
-    text-decoration: none;
+#technav div {
+	display: inline;
+	padding: .2em 1em;
+	white-space: nowrap;
 }
 
-#technav a:hover {
-    background-color: black;
-}
-
-/* Special rendering of the "button" for the current page */
-#technav .technavat {
-    text-decoration: none;
-    padding: 3px 10px 3px 10px;
-    background-color: #B6CAE4;
-    color: black;
-}
-
-#technav .technavitem {
-    display: inline;
-    white-space: nowrap;
-}
-
-
 /* CENTRAL CONTENT AREA STYLING */
 #content {
-    position: relative;
+	font-size: 8pt;
 }
 
-#content A:link {
-    color: #336600;
-    text-decoration: underline;
+/* used in some plugins - showing ID (long) element in tables */
+.col_Id {
+	width: 40px;
 }
 
-#content A:visited {
-    color: #666666;
-    text-decoration: underline;
+/* styling button groups like in the bundles & log plugins */
+.buttonGroup {
+	text-align: right;
+	padding: .5em 1em .5em 0;
+	vertical-align: middle;
+}
+.buttonGroup select {
+	display: inline;
+	float: none;
+	margin: 0;
 }
 
-#content A:hover {
-    color: #ffffff;
-    background-color: #336600;
-    text-decoration: none;
+/* The following styles are not complete. They usually apply only padding, 
+ * margin... mostly *WHERE* the elements are visualised. Visual styling like
+ * colors and fonts are applied automatically by a JavaScript that borrows
+ * the visual element styles from the JQuery UI theme 
+ */
+
+/* input box, checkbox & buttons styling */
+.inputText, input.text, input.password, input.file, textarea, select {
+	color: #184054;
+	background-color: #f0f0f0;
+}
+.inputText, input.text, input.password, textarea {
+	border: 1px solid #999999;
+	border-bottom: 1px solid #cccccc;
+	border-right: 1px solid #cccccc;
 }
 
-#content A:active {
-    color: #ffffff;
-    background-color: #000000;
-    text-decoration: none;
+/* tables styling - must be in synch with tablesorter CSS */
+td, th { vertical-align: top }
+table.nicetable {
+	width: 100%;
+	text-align: left;
+}
+table.nicetable th, table.nicetable td {
+	border-bottom: 1px solid #cccccc;
+	text-align: left;
+	padding: .2em;
+	padding-left: .8em;
+}
+
+/* tablesorter styling */
+tr .header {
+	background-image: url(../lib/bg.gif);
+	background-repeat: no-repeat;
+	background-position: center right;
+	cursor: pointer;
+}
+tr .headerSortUp {
+	background-image: url(../lib/asc.gif);
+}
+tr .headerSortDown {
+	background-image: url(../lib/desc.gif);
+}
+
+/* status line */
+.statline {
+	margin-top: .5em !important;
+	margin-bottom: .5em !important;
+	padding: .2em;
 }
 
diff --git a/webconsole/src/main/resources/templates/main_header.html b/webconsole/src/main/resources/templates/main_header.html
index aee2d16..1805e6b 100644
--- a/webconsole/src/main/resources/templates/main_header.html
+++ b/webconsole/src/main/resources/templates/main_header.html
@@ -25,7 +25,7 @@
 	<script src="{2}/res/lib/support.js" type="text/javascript"></script>
 
 	<!-- temporary here - for compatibility untill all plugins are refactored -->
-	<script src="{2}/res/ui/admin.js" type="text/javascript"></script>
+	<!-- <script src="{2}/res/ui/admin.js" type="text/javascript"></script> -->
 </head>
 
 <body class="ui-widget">