You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by dd...@apache.org on 2005/11/21 18:39:45 UTC

svn commit: r345936 - in /portals/pluto/trunk/pluto-portal/src/main/webapp: ./ WEB-INF/fragments/ images/controls/

Author: ddewolf
Date: Mon Nov 21 09:39:32 2005
New Revision: 345936

URL: http://svn.apache.org/viewcvs?rev=345936&view=rev
Log:
New ui for pluto-portal.  We now use 100% css positioning.

Added:
    portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/
    portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/edit.png   (with props)
    portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/help.png   (with props)
    portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/max.png   (with props)
    portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/min.png   (with props)
    portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/norm.png   (with props)
    portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/view.png   (with props)
    portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css
    portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.js
Removed:
    portals/pluto/trunk/pluto-portal/src/main/webapp/login_success.jsp
    portals/pluto/trunk/pluto-portal/src/main/webapp/pluto_style.css
Modified:
    portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-page.jsp
    portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp
    portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/template.jsp

Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-page.jsp
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-page.jsp?rev=345936&r1=345935&r2=345936&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-page.jsp (original)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-page.jsp Mon Nov 21 09:39:32 2005
@@ -1,13 +1,16 @@
 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
 <%@ taglib uri="http://portals.apache.org/pluto" prefix="pluto" %>
-<TABLE>
-<c:forEach var="portlet" varStatus="status" items="${currentPage.portletIds}">
-<c:if test="${status.index % 2 == 0}">
-<TR>
-</c:if>
-<TD valign="top"><c:set var="portlet" value="${portlet}" scope="request"/><jsp:include page="portlet-skin.jsp"/></TD>
-<c:if test="${status.index % 2 != 0}">
-</TR>
-</c:if>
-</c:forEach>
-</TABLE>
+
+<div id="portletgroupone">
+  <c:forEach var="portlet" varStatus="status" items="${currentPage.portletIds}" step="2">
+    <c:set var="portlet" value="${portlet}" scope="request"/>
+    <jsp:include page="portlet-skin.jsp"/>
+  </c:forEach>
+</div>
+
+<div id="portletgrouptwo">
+    <c:forEach var="portlet" varStatus="status" items="${currentPage.portletIds}" begin="1">
+        <c:set var="portlet" value="${portlet}" scope="request"/>
+        <jsp:include page="portlet-skin.jsp"/>
+    </c:forEach>
+</div>
\ No newline at end of file

Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp?rev=345936&r1=345935&r2=345936&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp (original)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/portlet-skin.jsp Mon Nov 21 09:39:32 2005
@@ -1,17 +1,20 @@
 <%@ taglib uri="http://portals.apache.org/pluto" prefix="pluto" %>
 
 <pluto:portlet portletId="${portlet}">
-<TABLE class="portlet" border="1">
-<TR class="banner"><TD><pluto:title/></TD>
-    <TD><A href="<pluto:window windowState="minimized">">min</pluto:window></TD>
-    <TD><A href="<pluto:window windowState="maximized">">max</pluto:window></TD>
-    <TD><A href="<pluto:window windowState="normal">">nor</pluto:window></TD>
-    <TD><A href="<pluto:window portletMode="help">">help</pluto:window></TD>
-    <TD><A href="<pluto:window portletMode="edit">">edit</pluto:window></TD>
-    <TD><A href="<pluto:window portletMode="view">">view</pluto:window></TD></TR>
-<TR><TD colspan="7">
-    <pluto:render/>
-    </TD></TR>
-</TABLE>
+<div class="portlet" id='<c:out value="${portlet}"/>'>
+  <div class="header">
+     <a href="<pluto:window portletMode="help"/>"><span class="help"></span></a>
+     <a href="<pluto:window portletMode="edit"/>"><span class="edit"></span></a>
+     <a href="<pluto:window portletMode="view"/>"><span class="view"></span></a>
+
+     <a href="<pluto:window windowState="minimized"/>"><span class="max"></span></a>
+     <a href="<pluto:window windowState="maximized"/>"><span class="min"></span></a>
+     <a href="<pluto:window windowState="normal"/>"><span class="nor"></span></a>
+     <span class="title"><pluto:title/></span>
+  </div>
+  <p>
+      <pluto:render/>
+  </p>
+</div>
 </pluto:portlet>
 

Modified: portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/template.jsp
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/template.jsp?rev=345936&r1=345935&r2=345936&view=diff
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/template.jsp (original)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/WEB-INF/fragments/template.jsp Mon Nov 21 09:39:32 2005
@@ -1,44 +1,55 @@
 <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
 
-<HTML>
-<HEAD>
-<TITLE>Pluto Portal Driver</TITLE>
-<link rel="stylesheet" href="<c:out value="${pageContext.request.contextPath}"/>/pluto_style.css" type="text/css"></link>
-</HEAD>
+<html>
+<head>
+  <title>Pluto Portal</title>
+    <style type="text/css" title="currentStyle" media="screen">
+        @import "<c:out value="${pageContext.request.contextPath}"/>//pluto.css";
+	</style>
+    <script type="text/javascript" src="<c:out value="${pageContext.request.contextPath}"/>/pluto.js"></script>
+</head>
 
-<BODY>
+<body>
+ <div id="portal">
+  <div id="header">
+    Header
+  </div>
 
-<TABLE>
-<TR><TD><IMG src="<c:out value="${pageContext.request.contextPath}"/>/images/pluto.png"/></TD>
-    <TD style="align:right">Pluto Portal Driver</TD></TR>
-<TR><TD class="banner-highlight" colspan="2"></TD></TR>
-<TR><TD colspan="2"> &nbsp; </TD></TR>
-</TABLE>
+<div id="navigation">
+  <ul>
+  <c:forEach var="page" items="${driverConfig.pages}">
+  <c:choose>
+  <c:when test="${page == currentPage}">
+      <li class="selected"><a href="<c:out value="${pageContext.request.contextPath}"/>/portal/<c:out value="${page.name}"/>"><c:out value="${page.name}"/></a>
+          <ul>
+              <li>Subpage One</li>
+              <li>Another Page</li>
+              <li>Three Strikes</li>
+          </ul>
+      </li>
+  </c:when>
 
-<TABLE>
-<TR class="tab">
-    <c:forEach var="page" items="${driverConfig.pages}">
-    <c:choose>
-    <c:when test="${page == currentPage}">
-    <TD nowrap="true" class="tab-selected">
-    </c:when>
-    <c:otherwise>
-    <TD nowrap="true">
-    </c:otherwise>
-    </c:choose>
-        <A href="<c:out value="${pageContext.request.contextPath}"/>/portal/<c:out value="${page.name}"/>"><c:out value="${page.name}"/></A></TD>
-    <TD style="background-color:white"> &nbsp; </TD>
-    <c:set var="span" value="${span + 1}"/>
-    </c:forEach>
-    <TD style="background-color:white;width:100%;"> &nbsp; </TD></TR>
-    <TR><TD colspan="<c:out value="${span * 2}"/>"> &nbsp; </TD></TR>
-</TABLE>
+  <c:otherwise>
+      <li><a href="<c:out value="${pageContext.request.contextPath}"/>/portal/<c:out value="${page.name}"/>"><c:out value="${page.name}"/></a>
+          <ul>
+              <li>One, Two, Three</li>
+              <li>Six, Five, Four</li>
+          </ul>
+      </li>
+  </c:otherwise>
+  </c:choose>
+  </c:forEach>
+  </ul>
+  </div>
 
-<TABLE>
-<TR><TD>
-    <%-- This could be dynamic.  At this point there's no need --%>
-    <jsp:include page='<%=(String)pageContext.findAttribute("include")%>'/>
-    </TD></TR>
-</TABLE>
-</BODY>
-</HTML>
+  <!-- The main content block -->
+  <div id="content">
+      <jsp:include page='<%=(String)pageContext.findAttribute("include")%>'/>
+  </div>
+
+  <div id="footer">
+    Footer
+  </div>
+ </div>
+</body>
+</html>
\ No newline at end of file

Added: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/edit.png
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/edit.png?rev=345936&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/edit.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/help.png
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/help.png?rev=345936&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/help.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/max.png
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/max.png?rev=345936&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/max.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/min.png
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/min.png?rev=345936&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/min.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/norm.png
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/norm.png?rev=345936&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/norm.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/view.png
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/view.png?rev=345936&view=auto
==============================================================================
Binary file - no diff available.

Propchange: portals/pluto/trunk/pluto-portal/src/main/webapp/images/controls/view.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css?rev=345936&view=auto
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css (added)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.css Mon Nov 21 09:39:32 2005
@@ -0,0 +1,154 @@
+
+body {
+  font-family: helvetica, sans-serif;
+}
+
+#portal {
+  margin: 0px auto;
+  color: #333333;
+  background-color: #ffffff;
+  border: 1px solid gray;
+  line-height: 130%;
+}
+
+#header {
+  padding: 2px;
+  background-color: #dddddd;
+  border-bottom: 1px solid gray;
+}
+
+#navigation ul { /* all lists */
+	padding: 3;
+	margin: 0;
+	list-style: none;
+}
+
+#navigation li { /* all list items */
+	float: left;
+	position: relative;
+	width: 10em;
+}
+
+#navigation li ul { /* second-level lists */
+	display: none;
+	position: absolute;
+	top: 1em;
+	left: 0;
+}
+
+#navigation li>ul { /* to override top and left in browsers other than IE, which will position to the top right of the containing li, rather than bottom left */
+	top: auto;
+	left: auto;
+}
+
+#navigation li:hover ul, #navigation li.over ul { /* lists nested under hovered list items */
+	display: block;
+	border: 1px solid gray;
+	background-color: white;
+}
+
+#navigation li:hover ul a, #navigation li.over ul a { /* lists nested under hovered list items */
+}
+
+
+#content {
+  margin: 0;
+  padding-top: .25em;
+  padding-left: 0;
+  padding-right: 0;
+  clear: both;
+}
+
+#portletgroupone {
+  margin: 0;
+  padding: 0;
+  width: 48%;
+  padding: .25em;
+  float: left;
+}
+
+#portletgrouptwo {
+  margin: 0;
+  width: 48%;
+  padding: .25em;
+  float: right;
+}
+
+.portlet {
+  border: 1px solid black;
+  padding: .25em;
+  margin-bottom: .5em;
+}
+
+.portlet .header {
+  padding-left: .25em;
+  background-color: gray;
+  color: white;
+  font-weight: bold;
+}
+
+.portlet table {
+  width: 90%;
+  margin: 0 auto;
+}
+
+.portlet table th {
+  background-color: black;
+  color: white;
+}
+
+.portlet table td.abbr {
+  text-align: center;
+}
+
+
+#footer {
+  clear: both;
+  margin: 0;
+  padding: .5em;
+  color: #333;
+  background-color: #ddd;
+  border-top: 1px solid gray;
+  font-size: 1em;
+}
+
+.portlet .header {
+   white-space: nowrap;
+   border: 2px solid black;
+}
+
+.portlet .header span {
+    width: 16px;
+    height: 16px;
+    float: right;
+}
+
+.portlet .header span.title {
+    width: auto;
+    height: auto;
+    float: none;
+}
+
+span.min {
+  background: url(images/controls/min.png) no-repeat;
+}
+
+span.max {
+  background: url(images/controls/max.png) no-repeat;
+}
+
+span.norm {
+  background: url(images/controls/norm.png) no-repeat;
+}
+
+span.view {
+  background: url(images/controls/view.png) no-repeat;
+}
+
+span.edit {
+  background: url(images/controls/edit.png) no-repeat;
+}
+
+span.help {
+  background: url(images/controls/help.png) no-repeat;
+}

Added: portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.js
URL: http://svn.apache.org/viewcvs/portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.js?rev=345936&view=auto
==============================================================================
--- portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.js (added)
+++ portals/pluto/trunk/pluto-portal/src/main/webapp/pluto.js Mon Nov 21 09:39:32 2005
@@ -0,0 +1,15 @@
+    startList = function() {
+      if (document.all && document.getElementById) {
+        navRoot = document.getElementById("navigation");
+        for (i=0; i<navRoot.childNodes.length; i++) {
+          for(j=0; j<navRoot.childNodes[i].childNodes.length; j++) {
+            node = navRoot.childNodes[i].childNodes[j];
+            if (node.nodeName=="LI") {
+              node.onmouseover=function() { this.className+=" over"; }
+              node.onmouseout=function() { this.className=this.className.replace(" over", ""); }
+            }
+          }
+        }
+      }
+    }
+    window.onload=startList;