Update of /var/cvs/contributions/didactor2/src/core/metainf/tags/di/core
In directory james.mmbase.org:/tmp/cvs-serv495
Modified Files:
html.tagx leaf.tagx menuitem.tagx
Log Message:
code to determing activivity of element
See also:
http://cvs.mmbase.org/viewcvs/contributions/didactor2/src/core/metainf/tags/di/core
Index: html.tagx
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/metainf/tags/di/core/html.tagx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- html.tagx 1 Feb 2008 15:30:09 -0000 1.10
+++ html.tagx 15 Feb 2008 14:18:28 -0000 1.11
@@ -77,10 +77,11 @@
</mm:hasrank>
<div class="componentBody">
+ <mm:write request="component" value="${component}" />
<di:include page="/cockpit/applicationbar.jsp" />
<di:include page="/cockpit/providerbar.jsp" />
<di:include page="/cockpit/educationbar.jsp" />
- <div class="di_body mm_c_$">
+ <div class="di_body mm_c_${component}">
<jsp:doBody />
</div>
</div>
Index: leaf.tagx
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/metainf/tags/di/core/leaf.tagx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- leaf.tagx 14 Feb 2008 16:22:45 -0000 1.1
+++ leaf.tagx 15 Feb 2008 14:18:28 -0000 1.2
@@ -7,40 +7,40 @@
<jsp:directive.tag
description="In the edit-environment horrible trees are constructed with
tables in tables and spacers and what not. This helps at least keeping the jsp
more or less tidy."
/>
- <jsp:directive.attribute name="last" type="java.lang.Boolean" />
- <jsp:directive.attribute name="icon" type="java.lang.Boolean" />
+ <jsp:directive.attribute name="last" type="java.lang.Integer" />
+ <jsp:directive.attribute name="icon" type="java.lang.String" />
<jsp:directive.attribute name="click" type="java.lang.String" />
<jsp:directive.attribute name="open" type="java.lang.Boolean" />
<jsp:directive.attribute name="depth" type="java.lang.Integer" />
<jsp:directive.attribute name="styleClass" />
+ <mm:import id="d" vartype="integer">
+ <c:choose>
+ <c:when test="${empty depth}">
+ <mm:depth>${_ - 1}</mm:depth>
+ </c:when>
+ <c:otherwise>${depth}</c:otherwise>
+ </c:choose>
+ </mm:import>
+
+ <mm:import id="l">${empty last ? 0 : last}</mm:import>
+
+
<table border="0" cellpadding="0" cellspacing="0" class="${styleClass}">
<tr>
<mm:link page="/education/wizards/gfx/tree_spacer.gif">
- <td><img src="${_}" width="${16 + 16 * depth}" height="16" border="0"
align="center" /></td>
- </mm:link>
- <c:choose>
- <c:when test="${empty click}">
- <mm:link page="/education/wizards/gfx/tree_spacer.gif">
- <td><img src="${_}" width="16" height="16" border="0"
align="center" /></td>
+ <td><img src="${_}" width="${16 * (1 + l)}" height="16" border="0"
align="center" /></td>
</mm:link>
<mm:link page="/education/wizards/gfx/tree_vertline.gif"
write="false">
- <c:if test="${depth ge 2}">
- <c:forEach begin="0" end="${depth - 2}">
+ <c:forEach begin="${l + 1}" end="${d}">
<td><img src="${_}" border="0" align="center"
valign="middle"/></td>
</c:forEach>
- </c:if>
</mm:link>
+ <c:choose>
+ <c:when test="${empty click}">
<mm:link page="/education/wizards/gfx/tree_vertline-leaf.gif">
<td><img src="${_}" border="0" align="center"
valign="middle"/></td>
</mm:link>
- <c:if test="${empty icon or icon}">
- <mm:link page="/education/wizards/gfx/new_education.gif">
- <td>
- <img src="${_}" width="16" border="0" align="middle" />
- </td>
- </mm:link>
- </c:if>
</c:when>
<c:otherwise>
<td>
@@ -50,11 +50,16 @@
</a>
</td>
<td>
- <img src="gfx/folder_closed.gif" border="0" align="middle"
id="img2_${click}"/>
+ <img src="gfx/folder_${empty open or ! open ? 'closed' :
'open'}.gif" border="0" align="middle" id="img2_${click}"/>
</td>
</c:otherwise>
</c:choose>
<td>
+ <c:if test="${! empty icon}">
+ <mm:link page="/education/wizards/gfx/${icon}.gif">
+ <img src="${_}" width="16" border="0" align="middle" />
+ </mm:link>
+ </c:if>
<jsp:doBody />
</td>
</tr>
Index: menuitem.tagx
===================================================================
RCS file:
/var/cvs/contributions/didactor2/src/core/metainf/tags/di/core/menuitem.tagx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- menuitem.tagx 21 Jan 2008 18:31:02 -0000 1.4
+++ menuitem.tagx 15 Feb 2008 14:18:28 -0000 1.5
@@ -5,6 +5,7 @@
xmlns:di="http://www.didactor.nl/ditaglib_1.0"
version="2.0">
<jsp:directive.attribute name="component"
type="nl.didactor.component.Component" required="true" />
+ <jsp:directive.attribute name="active" type="java.lang.String" />
<jsp:directive.attribute name="type" />
<jsp:directive.attribute name="scope" />
@@ -26,7 +27,7 @@
<c:when test="${empty type or type eq 'div'}">
<div class="menuSeperator"><jsp:text> </jsp:text></div>
<div class="menuItem" id="menu_${component.name}">
- <a href="${treefile}" class="menubar"><di:translate
key="${component.name}.title" /></a>
+ <a href="${treefile}" class="menubar ${component.name eq active ?
'active' : ''}"><di:translate key="${component.name}.title" /></a>
</div>
</c:when>
<c:otherwise>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs