You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by fm...@apache.org on 2008/06/13 17:27:58 UTC
svn commit: r667571 - in /felix/trunk/webconsole/src/main:
java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
resources/res/imgs/down.gif resources/res/imgs/right.gif
resources/res/ui/admin.css resources/res/ui/bundles.js
Author: fmeschbe
Date: Fri Jun 13 08:27:57 2008
New Revision: 667571
URL: http://svn.apache.org/viewvc?rev=667571&view=rev
Log:
Add triangle icons to flip open and close the inline bundle details
and open just the single bundle with details when clicking on the
bundle name
Added:
felix/trunk/webconsole/src/main/resources/res/imgs/down.gif (with props)
felix/trunk/webconsole/src/main/resources/res/imgs/right.gif (with props)
Modified:
felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
felix/trunk/webconsole/src/main/resources/res/ui/admin.css
felix/trunk/webconsole/src/main/resources/res/ui/bundles.js
Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java?rev=667571&r1=667570&r2=667571&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java (original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java Fri Jun 13 08:27:57 2008
@@ -308,6 +308,7 @@
pw.println( "<script src='" + appRoot + "/res/ui/bundles.js' language='JavaScript'></script>" );
Util.startScript( pw );
+ pw.println( "var appRoot = '" + appRoot + "';" );
pw.println( "var bundleListData = " );
JSONWriter jw = new JSONWriter( pw );
try
Added: felix/trunk/webconsole/src/main/resources/res/imgs/down.gif
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/imgs/down.gif?rev=667571&view=auto
==============================================================================
Binary file - no diff available.
Propchange: felix/trunk/webconsole/src/main/resources/res/imgs/down.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: felix/trunk/webconsole/src/main/resources/res/imgs/right.gif
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/imgs/right.gif?rev=667571&view=auto
==============================================================================
Binary file - no diff available.
Propchange: felix/trunk/webconsole/src/main/resources/res/imgs/right.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: felix/trunk/webconsole/src/main/resources/res/ui/admin.css
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/ui/admin.css?rev=667571&r1=667570&r2=667571&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/res/ui/admin.css (original)
+++ felix/trunk/webconsole/src/main/resources/res/ui/admin.css Fri Jun 13 08:27:57 2008
@@ -170,6 +170,11 @@
padding: 5px;
}
+td.content img {
+ width: 10px;
+ height: 10px;
+}
+
td.disabled {
color: #999999;
}
Modified: felix/trunk/webconsole/src/main/resources/res/ui/bundles.js
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/resources/res/ui/bundles.js?rev=667571&r1=667570&r2=667571&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/resources/res/ui/bundles.js (original)
+++ felix/trunk/webconsole/src/main/resources/res/ui/bundles.js Fri Jun 13 08:27:57 2008
@@ -91,8 +91,10 @@
/* String */ function bundleInternal( /* Bundle */ bundle )
{
+ var icon = (bundle.props) ? "down" : "right";
var theBundle = "<td class='content right'>" + bundle.bundleId + "</td>";
- theBundle += "<td class='content'><a href='javascript:showDetails(" + bundle.bundleId + ")'>" + bundle.name + "</a></td>";
+ theBundle += "<td class='content'><img src='" + appRoot + "/res/imgs/" + icon + ".gif' onClick='showDetails(" + bundle.bundleId + ")' id='bundle" + bundle.bundleId + "_inline' />";
+ theBundle += " <a href='" + appRoot + "/bundles/" + bundle.bundleId + "'>" + bundle.name + "</a></td>";
theBundle += "<td class='content center'>" + bundle.state + "</td>";
// no buttons for system bundle
@@ -202,10 +204,12 @@
if (span.innerHTML)
{
span.innerHTML = '';
+ newLinkValue(bundleId, appRoot + "/res/imgs/right.gif");
}
else
{
- sendRequest('GET', "bundles/" + bundleId + ".json", displayBundleDetails);
+ sendRequest('GET', appRoot + "/bundles/" + bundleId + ".json", displayBundleDetails);
+ newLinkValue(bundleId, appRoot + "/res/imgs/down.gif");
}
}
}
@@ -220,6 +224,17 @@
}
+function newLinkValue(bundleId, newLinkValue)
+{
+
+ var link = document.getElementById("bundle" + bundleId + "_inline");
+ if (link)
+ {
+ link.src = newLinkValue;
+ }
+}
+
+
/* String */ function bundleDetails( props )
{
var innerHtml = '<td class=\"content\"> </td><td class=\"content\" colspan=\"6\"><table broder=\"0\">';