Author: wesleyhales
Date: 2008-03-18 10:11:56 -0400 (Tue, 18 Mar 2008)
New Revision: 10305
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/css/admin.css
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js
Log:
admin portlet final cleanup
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-18
12:43:53 UTC (rev 10304)
+++
modules/portlet/trunk/portal/src/main/java/org/jboss/portal/portlet/portal/admin/ui/AdminPortlet.java 2008-03-18
14:11:56 UTC (rev 10305)
@@ -168,11 +168,27 @@
" </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" +
+ " <span
class=\"par-status\">");
+
+ if (application.getStatus().toString().equals("STARTED")){
+ writer.print("<img
src=\"/simple-portal/images/admin/started-icon.gif\"
alt=\"\"/>");
+ }else{
+ writer.print("<img
src=\"/simple-portal/images/admin/stopped-icon.gif\"
alt=\"\"/>");
+ }
+ writer.print("" +
+ "" + 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" +
+ " <img
src=\"/simple-portal/images/admin/start-stop-edge.gif\"
alt=\"\"/>\n");
+ if (application.getStatus().toString().equals("STARTED")){
+ writer.print("<a class=\"stop\" href=\"" +
stopURL + "\">Stop</a></td>\n");
+ }else{
+ writer.print("<a class=\"start\" href=\"" +
startURL + "\">Start</a></td>\n");
+ }
+
+ writer.print("" +
+ "" +
+ "" +
" </div>\n" +
" </div>\n" +
" \n" +
@@ -210,12 +226,17 @@
" <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>" +
- "");
+ " <td></td>\n");
+ if (filter.getStatus().toString().equals("STARTED")){
+ writer.print(" <td
class=\"par-row-right\">Start | <a class=\"stop\"
href=\"" + stopURL + "\">Stop</a></td>\n");
+ }else{
+ writer.print(" <td
class=\"par-row-right\"><a class=\"start\" href=\"" +
startURL + "\">Start</a> | Stop</td>\n");
+ }
+ writer.print(" </tr>");
+
+
}
//
@@ -249,13 +270,16 @@
" <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>" +
+ " <td>" + descString +
"</td>\n");
+ if (container.getStatus().toString().equals("STARTED")){
+ writer.print(" <td
class=\"par-row-right\">Start | <a class=\"stop\"
href=\"" + stopURL + "\">Stop</a></td>\n");
+ }else{
+ writer.print(" <td
class=\"par-row-right\"><a class=\"start\" href=\"" +
startURL + "\">Start</a> | Stop</td>\n");
+ }
-// " <tr class=\"" +
(container.getStatus().toString().equals("FAILED") ? "admin-failed" :
"" ) + "\">\n" +
- "");
+ writer.print(" </tr>");
+
}
writer.print("</table>" +
" </div>\n" +
Modified: 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 2008-03-18
12:43:53 UTC (rev 10304)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/css/admin.css 2008-03-18
14:11:56 UTC (rev 10305)
@@ -80,7 +80,6 @@
top: 1px;
left: 18px;
position: absolute;
- color: #7a0f0f;
font-weight: bold;
}
@@ -134,11 +133,11 @@
padding: 0 5px 0 0;
}
-table.par-table td a.start {
+a.start {
color: #17600e
}
-table.par-table td a.stop {
+a.stop {
color: #9e0606;
}
Modified: 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 2008-03-18
12:43:53 UTC (rev 10304)
+++
modules/portlet/trunk/portal/src/main/resources/simple-portal-war/js/admin.js 2008-03-18
14:11:56 UTC (rev 10305)
@@ -39,21 +39,8 @@
}
}
- 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'));
- var cid = 'contract-'.concat(atarget);
- var eid = 'expand-'.concat(atarget);
- $(cid).style.display = 'none';
- new Effect.BlindUp(targets[i].id);
- $(eid).style.display = 'block';
- }catch(e){
- //alert(e);
- }
- }
+ //collapse all on page load
+ window.onload = function(){
+ collapseAll()
};
\ No newline at end of file