Author: wesleyhales
Date: 2008-03-18 00:01:11 -0400 (Tue, 18 Mar 2008)
New Revision: 10299
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/container-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/contract.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/expand.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/main-header-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/par-header.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/portlet-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-edge.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/started-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/stopped-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/sub-header-bg.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/warning-icon.gif
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/index.jsp
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/header.jsp
Log:
admin portlet ui changes - still more to do
Modified:
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java
===================================================================
---
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-17
22:53:22 UTC (rev 10298)
+++
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-18
04:01:11 UTC (rev 10299)
@@ -119,6 +119,18 @@
PortletApplicationRegistry registry =
(PortletApplicationRegistry)getPortletContext().getAttribute("PortletApplicationDeployer");
//
+ writer.print("" +
+ "" +
+ "" +
+ "<div class=\"admin-container full-width\">\n" +
+ " <div class=\"admin-header\">\n"
+
+ " <div class=\"expand\">\n" +
+ " <img
src=\"/simple-portal/images/admin/expand.gif\" alt=\"\"/><a
href=\"javascript:expandAll();\">Expand All</a>\n" +
+ " </div>\n" +
+ " <div class=\"collapse\">\n"
+
+ " <img
src=\"/simple-portal/images/admin/contract.gif\" alt=\"\"/><a
href=\"javascript:collapseAll();\">Collapse All</a>\n" +
+ " </div>\n" +
+ " </div>\n");
for (ManagedPortletApplication application :
registry.getManagedPortletApplications())
@@ -134,26 +146,48 @@
url.setParameter("lifecycle", "start");
String startURL = url.toString();
+ String htmlId = application.getId().substring(1,application.getId().length());
- writer.print("<table class=\"admin-table\">");
+
+
writer.print("" +
- " <tr>\n" +
- " <td class=\"admin-app-header\"
colspan=\"4\"><h3>Application</h3></td>\n" +
- " </tr>\n" +
- " <tr class=\"admin-cat-header\">\n" +
- " <td>ID</td>\n" +
- " <td>Status</td>\n" +
- " <td>Description</td>\n" +
- " <td></td>\n" +
- " </tr>" +
- " <tr>\n" +
- " <td>" + application.getId() +
"</td>\n" +
- " <td>" + application.getStatus() +
"</td>\n" +
- " <td></td>\n" +
- " <td><a href=\"" + startURL +
"\">Start</a> | <a href=\"" + stopURL +
"\">Stop</a></td>\n" +
- " </tr>");
+ "\n" +
+ " <div class=\"par-container\">\n"
+
+ " <div class=\"par-header\">\n"
+
+ " <div
class=\"par-header-left\">\n" +
+ " <a
id=\"contract-simple-portal\" href=\"#\"
onclick=\"collapse(this,'"+ htmlId +"');\">\n" +
+ " <img
src=\"/simple-portal/images/admin/contract.gif\" alt=\"\"
/>\n" +
+ " <h3 class=\"par\">"+
application.getId() +"</h3>\n" +
+ " </a>\n" +
+ " <a id=\"expand-simple-portal\"
href=\"#\" onclick=\"expand(this,'"+ htmlId +"');\"
style=\"display:none\">\n" +
+ " <img
src=\"/simple-portal/images/admin/expand.gif\" alt=\"\" />\n"
+
+ " <h3 class=\"par\">"+
application.getId() +"</h3>\n" +
+ " </a>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div
class=\"par-header-right\">\n" +
+ " <span
class=\"par-status\"><img
src=\"/simple-portal/images/admin/started-icon.gif\"
alt=\"\"/>" + application.getStatus() + "</span>\n" +
+ "\n" +
+ " <div
class=\"par-control\">\n" +
+ " <img
src=\"/simple-portal/images/admin/start-stop-edge.gif\"
alt=\"\"/>\n" +
+ " <a href=\"" + stopURL +
"\">Stop</a></td>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " \n" +
+ " </div></div>" +
+ "" +
+ " <div class=\"target\" id=\""
+ htmlId + "-target\">\n" +
+ " <table class=\"par-table
full-width\" >\n" +
+ " <tr
class=\"par-subhead\">\n" +
+ " <td
class=\"par-header-left\">ID</td>\n" +
+ " <td>Status</td>\n" +
+ " <td>Description</td>\n"
+
+ " <td></td>\n" +
+ " </tr>\n" +
+ "\n");
+
//
for (ManagedPortletFilter filter : application.getManagedPortletFilters())
{
@@ -172,21 +206,16 @@
// startURL + "\">Start</a> <a href=\"" +
stopURL + "\">Stop</a></li>");
writer.print("" +
- " <tr>\n" +
- " <td class=\"admin-filter-header\"
colspan=\"4\"><h3>Filter</h3></td>\n" +
- " </tr>\n" +
- //" <tr class=\"admin-cat-header\">\n" +
- //" <td>ID</td>\n" +
- //" <td>Status</td>\n" +
- //" <td></td>\n" +
- //" </tr>" +
- " <tr>\n" +
- " <td>" + filter.getId() + "</td>\n"
+
- " <td>" + filter.getStatus() +
"</td>\n" +
- " <td></td>\n" +
- " <td><a href=\"" + startURL +
"\">Start</a> | <a href=\"" + stopURL +
"\">Stop</a></td>\n" +
- " </tr>");
+ "" +
+ " <tr
class=\"par-filter-row\">\n" +
+ " <td
class=\"par-row-left\"><img class=\"icon\"
src=\"/simple-portal/images/admin/filter-icon.gif\"
alt=\"\"/>" + filter.getId() + "</td>\n" +
+ " <td>" + filter.getStatus()
+ "</td>\n" +
+ " <td></td>\n" +
+ " <td
class=\"par-row-right\"><a class=\"start\" href=\"" +
startURL + "\">Start</a> | <a class=\"stop\"
href=\"" + stopURL + "\">Stop</a></td>\n" +
+ " </tr>" +
+ "");
+
}
//
@@ -216,34 +245,35 @@
}
writer.print("" +
- " <tr>\n" +
- " <td class=\"admin-container-header\"
colspan=\"4\"><h3>Container</h3></td>\n" +
- " </tr>\n" +
- //" <tr class=\"admin-cat-header\">\n" +
- //" <td>ID</td>\n" +
- //" <td>Status</td>\n" +
- //" <td></td>\n" +
- //" </tr>" +
- " <tr class=\"" +
(container.getStatus().toString().equals("FAILED") ? "admin-failed" :
"" ) + "\">\n" +
- " <td>" + container.getId() +
"</td>\n" +
- " <td>" + container.getStatus() +
"</td>\n" +
- " <td>" + descString + "</td>\n" +
- " <td><a href=\"" + startURL +
"\">Start</a> | <a href=\"" + stopURL +
"\">Stop</a></td>\n" +
- " </tr>");
+ "" +
+ " <tr
class=\"par-container-row\">\n" +
+ " <td
class=\"par-row-left\"><img class=\"icon\"
src=\"/simple-portal/images/admin/portlet-icon.gif\"
alt=\"\"/>" + container.getId() + "</td>\n" +
+ " <td>" +
container.getStatus() + "</td>\n" +
+ " <td>" + descString +
"</td>\n" +
+ " <td
class=\"par-row-right\"><a class=\"start\" href=\"" +
startURL + "\">Start</a> | <a class=\"stop\"
href=\"" + stopURL + "\">Stop</a></td>\n" +
+ " </tr>" +
+
+
+// " <tr class=\"" +
(container.getStatus().toString().equals("FAILED") ? "admin-failed" :
"" ) + "\">\n" +
+ "");
}
- writer.print("</table>");
+ writer.print("</table>" +
+ " </div>\n" +
+ "");
}
+ writer.print("</div>" +
+ " </div>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "\n" +
+ " </div>\n" +
+ " <br class=\"clear\"/>\n" +
+ "</div>");
+
//
writer.close();
}
-}
-
- /*protected void doView(RenderRequest request, RenderResponse response) throws
PortletException, IOException
- {
- PortletRequestDispatcher rd =
getPortletContext().getRequestDispatcher("admin/admin.jsp");
- rd.include(request, response);
- }*/
-//}
+}
\ No newline at end of file
Modified:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/index.jsp
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/index.jsp 2008-03-17
22:53:22 UTC (rev 10298)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/admin/index.jsp 2008-03-18
04:01:11 UTC (rev 10299)
@@ -4,8 +4,12 @@
<%@ taglib uri="/WEB-INF/portal.tld" prefix="portal" %>
<%@ page isELIgnored="false" %>
+
+
+
<%@ include file="/layouts/admin-header.jsp" %>
-
+ <link rel="stylesheet"
href="${pageContext.request.contextPath}/css/admin.css"
type="text/css"/>
+ <script type="text/javascript"
src="${pageContext.request.contextPath}/js/admin.js"></script>
<portal:page>
<jbp:portlet name="AdminPortlet"
applicationName="simple-portal"/>
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css
(rev 0)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css 2008-03-18
04:01:11 UTC (rev 10299)
@@ -0,0 +1,159 @@
+
+div.admin-container div.admin-header {
+ background-image: url( /simple-portal/images/admin/main-header-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ height: 42px;
+ border-bottom: 1px solid #989898;
+ position: relative;
+}
+
+div.admin-container div.admin-header div.expand {
+ position: absolute;
+ bottom: 5px;
+ left: 10px;
+}
+
+div.admin-container div.admin-header div.collapse {
+ position: absolute;
+ bottom: 5px;
+ left: 100px;
+}
+
+div.admin-container div.admin-header div.expand a,
+ div.admin-container div.admin-header div.collapse a {
+ text-decoration: none
+}
+
+div.admin-container div.admin-header>div img {
+ margin: 0 5px 0 0;
+}
+
+div.admin-container div.par-container {
+
+}
+
+div.admin-container div.par-container div.par-header {
+ background-image: url( /simple-portal/images/admin/par-header.gif);
+ background-repeat: no-repeat;
+ background-position: top left;
+ height: 48px;
+ border-bottom: 2px solid #989898;
+ position: relative;
+}
+
+div.admin-container div.par-container div.par-header-left {
+ position: absolute;
+ bottom: 5px;
+ left: 10px;
+}
+
+div.admin-container div.par-container div.par-header-left a {
+ text-decoration: none;
+}
+
+div.admin-container div.par-container div.par-header-left h3.par {
+ display: inline;
+ color: #4c1010;
+ font-size: 1.2em;
+}
+
+div.admin-container div.par-container div.par-header-right {
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 140px;
+ height: 19px;
+}
+
+div.admin-container div.par-container div.par-header-right div.par-control {
+ background-image: url( /simple-portal/images/admin/start-stop-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ width: 65px;
+ height: 19px;
+ float: right;
+ position: relative; /*border-bottom: 1px solid #c3c3c3;*/
+}
+
+div.admin-container div.par-container div.par-header-right div.par-control a {
+ top: 1px;
+ left: 18px;
+ position: absolute;
+ color: #7a0f0f;
+ font-weight: bold;
+}
+
+div.admin-container div.par-container div.par-header-right>span.par-status {
+ float: left;
+ padding: 2px 0 0 0;
+}
+
+div.admin-container div.par-container div.par-header-right>span.par-status img {
+ margin: 0 5px 0 0;
+}
+
+table.par-table {
+ margin: 0;
+ padding: 0;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+table.par-table td {
+ padding: 0 0 0 3px;
+}
+
+table.par-table tr.par-subhead {
+ background-image: url( /simple-portal/images/admin/sub-header-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+}
+
+table.par-table tr.par-subhead td {
+ height: 25px;
+ border-bottom: #d2d2d2;
+ color: #fff;
+ font-weight: bold;
+}
+
+table.par-table td img.icon {
+ margin: 0 3px 0 0;
+}
+
+table.par-table td.par-header-left {
+ padding: 0 0 0 15px;
+}
+
+table.par-table td.par-row-left {
+ padding: 0 0 0 15px;
+}
+
+table.par-table td.par-row-right {
+ text-align: right;
+ padding: 0 5px 0 0;
+}
+
+table.par-table td a.start {
+ color: #17600e
+}
+
+table.par-table td a.stop {
+ color: #9e0606;
+}
+
+table.par-table tr.par-container-row {
+ background-image: url( /simple-portal/images/admin/container-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ height: 38px;
+ border-bottom: 1px solid #fff;
+}
+
+table.par-table tr.par-filter-row {
+ background-image: url( /simple-portal/images/admin/filter-bg.gif );
+ background-repeat: repeat-x;
+ background-position: top left;
+ height: 38px;
+ border-bottom: 1px solid #fff;
+}
\ No newline at end of file
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/container-bg.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/container-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/contract.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/contract.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/expand.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/expand.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-bg.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-icon.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/filter-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/main-header-bg.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/main-header-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/par-header.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/par-header.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/portlet-icon.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/portlet-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-bg.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-edge.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/start-stop-edge.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/started-icon.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/started-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/stopped-icon.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/stopped-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/sub-header-bg.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/sub-header-bg.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/warning-icon.gif
===================================================================
(Binary files differ)
Property changes on:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/images/admin/warning-icon.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
===================================================================
--- modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
(rev 0)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js 2008-03-18
04:01:11 UTC (rev 10299)
@@ -0,0 +1,56 @@
+
+ function collapse(e,target) {
+ e.hide();
+ new Effect.BlindUp(target + '-target', {queue:
{position:'front', scope: 'expandscope', limit:1} });
+ Effect.Appear('expand-' + target, { duration: 0.0 });
+ }
+
+ function expand(e,target) {
+ e.hide();
+ Effect.BlindDown(target + '-target', {queue: {position:'end',
scope: 'expandscope', limit:1} });
+ Effect.Appear('contract-' + target, { duration: 0.0 });
+ }
+
+ function collapseAll() {
+ var targets = document.getElementsByClassName('target');
+ for (var i=0; i < targets.length; i++){
+ try{
+ var target =
targets[i].id.substring(0,targets[i].id.lastIndexOf('-target'));
+ $('contract-' + target).hide();
+ new Effect.BlindUp(target + '-target');
+ Effect.Appear('expand-' + target, { duration: 0.0 });
+ }catch(e){
+// alert(e);
+ }
+ }
+ }
+
+ function expandAll() {
+ var targets = document.getElementsByClassName('target');
+ for (var i=0; i < targets.length; i++){
+ try{
+ var target =
targets[i].id.substring(0,targets[i].id.lastIndexOf('-target'));
+ $('expand-' + target).hide();
+ new Effect.BlindDown(target + '-target');
+ Effect.Appear('contract-' + target, { duration: 0.0 });
+ }catch(e){
+// alert(e);
+ }
+ }
+ }
+
+ window.onload = function(){
+ var targets = document.getElementsByClassName('target');
+ for (var i=0; i < targets.length; i++){
+ try{
+
//alert(targets[i].id.substring(0,targets[i].id.lastIndexOf('-target')));
+ var atarget =
targets[i].id.substring(0,targets[i].id.lastIndexOf('-target'));
+ $('contract-' + atarget).hide();
+
+ new Effect.BlindUp(atarget + '-target');
+ Effect.Appear('expand-' + atarget, { duration: 0.0 });
+ }catch(e){
+ //alert(e);
+ }
+ }
+ };
\ No newline at end of file
Modified:
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/header.jsp
===================================================================
---
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/header.jsp 2008-03-17
22:53:22 UTC (rev 10298)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/layouts/header.jsp 2008-03-18
04:01:11 UTC (rev 10299)
@@ -7,6 +7,7 @@
<head>
<title>Portlet Container 2.0</title>
<link rel="stylesheet"
href="${pageContext.request.contextPath}/css/master.css"
type="text/css"/>
+
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/css/shadowbox.css"/>
<script type="text/javascript"
src="${pageContext.request.contextPath}/js/prototype.js"></script>
<script type="text/javascript"