mcardle 2005/05/31 18:20:35 CEST
Modified files:
src/view/jsp/include box.jsp box_declarations.inc
box_files.inc box_links.inc box_news.inc
box_text.inc box_webapps.inc layout.jsp
Log:
refactored container fieldnames to a simpler form without the "id" identifier
Revision Changes Path
1.51 +11 -9 corporate_portal_templates/src/view/jsp/include/box.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/box.jsp.diff?r1=1.50&r2=1.51&f=h
1.3 +51 -25
corporate_portal_templates/src/view/jsp/include/box_declarations.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/box_declarations.inc.diff?r1=1.2&r2=1.3&f=h
1.5 +2 -2
corporate_portal_templates/src/view/jsp/include/box_files.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/box_files.inc.diff?r1=1.4&r2=1.5&f=h
1.2 +2 -2
corporate_portal_templates/src/view/jsp/include/box_links.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/box_links.inc.diff?r1=1.1&r2=1.2&f=h
1.2 +6 -6
corporate_portal_templates/src/view/jsp/include/box_news.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/box_news.inc.diff?r1=1.1&r2=1.2&f=h
1.2 +3 -3
corporate_portal_templates/src/view/jsp/include/box_text.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/box_text.inc.diff?r1=1.1&r2=1.2&f=h
1.4 +1 -1
corporate_portal_templates/src/view/jsp/include/box_webapps.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/box_webapps.inc.diff?r1=1.3&r2=1.4&f=h
1.13 +4 -4
corporate_portal_templates/src/view/jsp/include/layout.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/layout.jsp.diff?r1=1.12&r2=1.13&f=h
Index: box.jsp
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/box.jsp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- box.jsp 9 Nov 2004 19:21:23 -0000 1.50
+++ box.jsp 31 May 2005 16:20:34 -0000 1.51
@@ -2,6 +2,7 @@
<%@ include file="declarations.inc"%>
<%@ include file="box_declarations.inc"%>
+
<content:containerList name='<%="boxContainer" + id%>' id="boxContainerList">
<jahiaHtml:actionMenu name="boxContainerList" namePostFix="Portlet"
resourceBundle="jahiatemplates.Corporate_portal_templates">
@@ -13,23 +14,23 @@
<%
ContainerBean boxContainerBean = (ContainerBean)
pageContext.findAttribute("boxContainer");
JahiaContainer theContainer = boxContainerBean.getJahiaContainer();
- if (theContainer.getField("boxType" + id) != null) {
+ if (theContainer.getField("boxType") != null) {
%>
<content:updateContainerURL id="updateContainerURL" display="false"/>
<content:deleteContainerURL id="deleteContainerURL" display="false"/>
- <bean:define id="boxTypeValue" name="boxContainer"
property='<%="field(boxType" + id + ").value"%>'/>
- <bean:define id="boxTitleLayoutValue" name="boxContainer"
property='<%="field(boxTitleLayout" + id + ").value"%>'/>
- <bean:define id="boxContentLayoutValue" name="boxContainer"
property='<%="field(boxContentLayout" + id + ").value"%>'/>
+ <bean:define id="boxTypeValue" name="boxContainer"
property='field(boxType).value'/>
+ <bean:define id="boxTitleLayoutValue" name="boxContainer"
property='field(boxTitleLayout).value'/>
+ <bean:define id="boxContentLayoutValue" name="boxContainer"
property='field(boxContentLayout).value'/>
<%
String boxTitleLayout = (String)
pageContext.findAttribute("boxTitleLayoutValue");
String boxContentLayout = (String)
pageContext.findAttribute("boxContentLayoutValue");
%>
- <content:textField name='<%="boxTitle" + id%>' diffActive="true"
display="false" valueId="boxTitle" defaultValue=""/>
+ <content:textField name='boxTitle' diffActive="true" display="false"
valueId="boxTitle" defaultValue=""/>
<logic:notEmpty name="boxTitle">
<bean:define id="displayBox" value="true"/>
</logic:notEmpty>
-
+
<logic:empty name="boxTitle">
<jahia:ifNotEditMode>
<bean:define id="displayBox" value="false"/>
@@ -55,8 +56,9 @@
<bean:define id="links"
value='<%=ResourceBundleMarker.drawMarker(resBundleID,"links","")%>'/>
<bean:define id="webapps"
value='<%=ResourceBundleMarker.drawMarker(resBundleID,"webapps","")%>'/>
<bean:define id="news"
value='<%=ResourceBundleMarker.drawMarker(resBundleID,"news","")%>'/>
- <bean:define id="newsLink"
value='<%=ResourceBundleMarker.drawMarker(resBundleID,"newsLink","")%>'/>
<bean:define id="freeText"
value='<%=ResourceBundleMarker.drawMarker(resBundleID,"freeText","")%>'/>
+ <bean:define id="newslast5"
value='<%=ResourceBundleMarker.drawMarker(resBundleID,"newslast5","")%>'/>
+
<c:choose>
<c:when test="${boxTypeValue == files}">
<%@ include file="box_files.inc"%>
@@ -70,8 +72,8 @@
<c:when test="${boxTypeValue == news}">
<%@ include file="box_news.inc"%>
</c:when>
- <c:when test="${boxTypeValue == newsLink}">
- <%@ include file="box_link_news.inc"%>
+ <c:when test="${boxTypeValue == newslast5}">
+ <%@ include file="box_newslast5.inc"%>
</c:when>
<c:otherwise>
<%@ include file="box_text.inc"%>
Index: box_declarations.inc
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/box_declarations.inc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- box_declarations.inc 20 Nov 2003 17:17:57 -0000 1.2
+++ box_declarations.inc 31 May 2005 16:20:34 -0000 1.3
@@ -10,27 +10,27 @@
bundleKey="<%=resBundleID%>"
>
<content:declareContainer>
- <content:declareField name='<%="boxTitle" + id%>'
+ <content:declareField name='boxTitle'
title="Title <span style='color:#ff0000;'>(mandatory)</span>"
titleKey="titleMandatory"
bundleKey="<%=resBundleID%>"
type="SmallText"
/>
- <content:declareField name='<%="boxType" + id%>'
+ <content:declareField name='boxType'
title="Content"
titleKey="content"
bundleKey="<%=resBundleID%>"
type="SharedSmallText"
value="<%=getMultivalues(resBundleID,boxTypes)%>"
/>
- <content:declareField name='<%="boxTitleLayout" + id%>'
+ <content:declareField name='boxTitleLayout'
title="Title Layout"
titleKey="titleLayout"
bundleKey="<%=resBundleID%>"
type="SharedSmallText"
value="<%=getMultivalues(resBundleID,boxTitleTypes)%>"
/>
- <content:declareField name='<%="boxContentLayout" + id%>'
+ <content:declareField name='boxContentLayout'
title="Content Layout"
titleKey="contentLayout"
bundleKey="<%=resBundleID%>"
@@ -45,13 +45,13 @@
bundleKey="<%=resBundleID%>"
>
<content:declareContainer>
- <content:declareField name='<%="file" + id%>'
+ <content:declareField name='file'
title="File"
titleKey="file"
bundleKey="<%=resBundleID%>"
type="File"
/>
- <content:declareField name='<%="description" + id%>'
+ <content:declareField name='description'
title="Description"
titleKey="description"
bundleKey="<%=resBundleID%>"
@@ -67,13 +67,13 @@
bundleKey="<%=resBundleID%>"
>
<content:declareContainer>
- <content:declareField name='<%="link" + id%>'
+ <content:declareField name='link'
title="Link"
titleKey="link"
bundleKey="<%=resBundleID%>"
type="Page"
/>
- <content:declareField name='<%="linkDesc" + id%>'
+ <content:declareField name='linkDesc'
title="Description"
titleKey="description"
bundleKey="<%=resBundleID%>"
@@ -84,18 +84,18 @@
<%//----------------------------------------------------------------- %>
<content:declareContainerList name='<%="textContainer" + id%>'
- title="Free text and Image Container"
+ title="Free text and Container"
titleKey="freeTextContainer"
bundleKey="<%=resBundleID%>"
>
<content:declareContainer>
- <content:declareField name='<%="content" + id%>'
+ <content:declareField name='content'
title="Free Text"
titleKey="freeText"
bundleKey="<%=resBundleID%>"
type="BigText"
/>
- <content:declareField name='<%="image" + id%>'
+ <content:declareField name='textimage'
title="Image"
titleKey="image"
bundleKey="<%=resBundleID%>"
@@ -111,7 +111,7 @@
bundleKey="<%=resBundleID%>"
>
<content:declareContainer>
- <content:declareField name='<%="webapp" + id%>'
+ <content:declareField name='webapp'
title="Webapps"
titleKey="webapps"
bundleKey="<%=resBundleID%>"
@@ -127,33 +127,33 @@
bundleKey="<%=resBundleID%>"
>
<content:declareContainer>
- <content:declareField name='<%="newsTitle" + id%>'
+ <content:declareField name='newsTitle'
title="Title <span
style='color:#ff0000;'>(mandatory)</span>"
titleKey="titleMandatory"
bundleKey="<%=resBundleID%>"
type="SmallText"
/>
- <content:declareField name='<%="newsDesc" + id%>'
+ <content:declareField name='newsDesc'
title="Description"
titleKey="description"
bundleKey="<%=resBundleID%>"
type="BigText"
/>
- <content:declareField name='<%="newsLink" + id%>'
+ <content:declareField name='newsLink'
title="Link"
titleKey="link"
bundleKey="<%=resBundleID%>"
type="Page"
value="<jahia_linkonly>"
/>
- <content:declareField name='<%="newsStartDate" + id%>'
+ <content:declareField name='newsStartDate'
title="Start date"
titleKey="startDate"
bundleKey="<%=resBundleID%>"
type="Date"
value="<jahia_calendar[dd mon yyyy / HH:MM]>"
/>
- <content:declareField name='<%="newsEndDate" + id%>'
+ <content:declareField name='newsEndDate'
title="End date"
titleKey="endDate"
bundleKey="<%=resBundleID%>"
@@ -162,23 +162,49 @@
/>
</content:declareContainer>
</content:declareContainerList>
-
<%//----------------------------------------------------------------- %>
- <content:declareContainerList name='<%="linkNewsListContainer" +
id%>'
- title="Link to news list"
- titleKey="linkNewsListContainer"
+ <content:declareContainerList name="<%="newsContainerLast5"+id%>"
+ title="News Container"
+ titleKey="newsContainer"
bundleKey="<%=resBundleID%>"
>
<content:declareContainer>
- <content:declareField name='<%="linkNewsList" + id%>'
- title="Link to news list"
- titleKey="linkNewsList"
+ <content:declareField name='newsTitle'
+ title="Title <span
style='color:#ff0000;'>(mandatory)</span>"
+ titleKey="titleMandatory"
+ bundleKey="<%=resBundleID%>"
+ type="SmallText"
+ />
+ <content:declareField name='newsDesc'
+ title="Description"
+ titleKey="description"
+ bundleKey="<%=resBundleID%>"
+ type="BigText"
+ />
+ <content:declareField name='newsLink'
+ title="Link"
+ titleKey="link"
bundleKey="<%=resBundleID%>"
type="Page"
+ value="<jahia_linkonly>"
+ />
+ <content:declareField name='newsStartDate'
+ title="Start date"
+ titleKey="startDate"
+ bundleKey="<%=resBundleID%>"
+ type="Date"
+ value="<jahia_calendar[dd mon yyyy / HH:MM]>"
+ />
+ <content:declareField name='newsEndDate_Last5'
+ title="End date"
+ titleKey="endDate"
+ bundleKey="<%=resBundleID%>"
+ type="Date"
+ value="<jahia_calendar[dd mon yyyy / HH:MM]>"
/>
</content:declareContainer>
- </content:declareContainerList>
+ </content:declareContainerList>
</content:declareContainer>
</content:declareContainerList>
Index: box_files.inc
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/box_files.inc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- box_files.inc 10 Dec 2004 11:01:25 -0000 1.4
+++ box_files.inc 31 May 2005 16:20:34 -0000 1.5
@@ -4,7 +4,7 @@
<%
ContainerBean filesContainerBean = (ContainerBean)
pageContext.findAttribute("filesContainer");
JahiaContainer currentContainer =
filesContainerBean.getJahiaContainer();
- JahiaFileField file = (JahiaFileField)
currentContainer.getFieldObject("file" + id);
+ JahiaFileField file = (JahiaFileField)
currentContainer.getFieldObject("file");
String fileName = "null";
String formatedSize = "";
String formatedLastModifDate = "";
@@ -35,7 +35,7 @@
<td class="nowrap" width="5"><img
src="<%=theURL%>/images/pix.gif" width="5" height="1" alt=""/></td>
<td class="nowrap" valign="top" width="100%"><a class="box"
href="<%=downloadUrl%>"><%=fileName%></a>
- <content:textField valueId="description"
name='<%="description" + id%>' diffActive="true" display="false"
defaultValue=""/>
+ <content:textField valueId="description"
name='description' diffActive="true" display="false" defaultValue=""/>
<logic:notEmpty name="description">
<br/><bean:write name="description" filter="false"/>
</logic:notEmpty>
Index: box_links.inc
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/box_links.inc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- box_links.inc 28 Oct 2003 22:56:41 -0000 1.1
+++ box_links.inc 31 May 2005 16:20:34 -0000 1.2
@@ -3,7 +3,7 @@
<content:container id="linksContainer">
<% rowColorCount++; %>
<tr bgcolor='<%=rowColorCount % 2 == 1 ? "#ffffff" : "#dddddd"%>'>
- <content:pageField valueId="link" name='<%="link" + id%>'>
+ <content:pageField valueId="link" name='link'>
<logic:notEmpty name="link">
<td valign="top">-</td>
<td valign="top" width="100%">
@@ -13,7 +13,7 @@
</logic:equal>
href="<bean:write name='link' property='url'/>"
><bean:write name="link" property="title"
filter="false"/></a>
- <content:textField valueId="linkDesc"
name='<%="linkDesc" + id%>' display="false" defaultValue=""/>
+ <content:textField valueId="linkDesc"
name='linkDesc' display="false" defaultValue=""/>
<logic:notEmpty name="linkDesc">
<span class="grey"> : <bean:write
name="linkDesc" filter="false"/></span>
</logic:notEmpty>
Index: box_news.inc
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/box_news.inc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- box_news.inc 28 Oct 2003 22:56:41 -0000 1.1
+++ box_news.inc 31 May 2005 16:20:34 -0000 1.2
@@ -6,12 +6,12 @@
while (newsEnumeration.hasMoreElements()) {
JahiaContainer newsContainer =
(JahiaContainer)newsEnumeration.nextElement();
- String newsTitle = newsContainer.getFieldValue("newsTitle" + id, "",
true , jData.params());
- String newsDesc = newsContainer.getFieldValue("newsDesc" + id, "", true
, jData.params());
- JahiaPage myNewsLink = (JahiaPage)
newsContainer.getFieldObject("newsLink" + id);
- String newsDate = (String) newsContainer.getFieldValue("newsStartDate" +
id,"");
- String newsStartDateStr = (String)
newsContainer.getFieldObject("newsStartDate" + id);
- String newsEndDateStr = (String)
newsContainer.getFieldObject("newsEndDate" + id);
+ String newsTitle = newsContainer.getFieldValue("newsTitle" , "", true ,
jData.params());
+ String newsDesc = newsContainer.getFieldValue("newsDesc" , "", true ,
jData.params());
+ JahiaPage myNewsLink = (JahiaPage)
newsContainer.getFieldObject("newsLink" );
+ String newsDate = (String) newsContainer.getFieldValue("newsStartDate"
,"");
+ String newsStartDateStr = (String)
newsContainer.getFieldObject("newsStartDate" );
+ String newsEndDateStr = (String)
newsContainer.getFieldObject("newsEndDate" );
long newsStartDate = -1;
long newsEndDate = -1;
try {
Index: box_text.inc
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/box_text.inc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- box_text.inc 28 Oct 2003 22:56:41 -0000 1.1
+++ box_text.inc 31 May 2005 16:20:34 -0000 1.2
@@ -1,15 +1,15 @@
<content:containerList name='<%="textContainer" + id%>'
id="textContainerList" parentContainerName="boxContainer">
<content:container id="textContainer">
<jahiaHtml:actionMenu name="textContainer" namePostFix=""
resourceBundle="jahiatemplates.Corporate_portal_templates">
- <logic:present name="textContainer" property='<%="field(image" +
id + ")"%>'>
- <bean:define id="image" name="textContainer"
property='<%="field(image" + id + ").object"%>'/>
+ <logic:present name="textContainer"
property='<%="field(textimage)"%>'>
+ <bean:define id="image" name="textContainer"
property='<%="field(textimage).object"%>'/>
<logic:present name="image">
<logic:equal name="image" property="image" value="true">
<img src="<bean:write name='image'
property='downloadUrl'/>" border="0" alt="<bean:write name='image'
property='fileFieldTitle' filter='false'/>"/>
</logic:equal>
</logic:present>
</logic:present>
- <content:textField name='<%="content" + id%>' defaultValue=""
diffActive="true"/>
+ <content:textField name='content' defaultValue=""
diffActive="true"/>
<br/>
</jahiaHtml:actionMenu>
</content:container>
Index: box_webapps.inc
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/box_webapps.inc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- box_webapps.inc 11 Mar 2005 09:17:23 -0000 1.3
+++ box_webapps.inc 31 May 2005 16:20:34 -0000 1.4
@@ -1,6 +1,6 @@
<content:containerList name='<%="webappsContainer" + id%>'
id="webappsContainerList" parentContainerName="boxContainer">
<content:container>
- <content:applicationField name='<%="webapp" + id%>' id="webapp"
display="false" />
+ <content:applicationField name='webapp' id="webapp" display="false"
/>
<bean:define id="portletWindowBean" name="webapp" property="object"
/>
<jahiaHtml:windowStates name="portletWindowBean" />
<jahiaHtml:portletModes name="portletWindowBean" />
Index: layout.jsp
===================================================================
RCS file:
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/layout.jsp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- layout.jsp 9 Nov 2004 19:21:23 -0000 1.12
+++ layout.jsp 31 May 2005 16:20:34 -0000 1.13
@@ -28,10 +28,10 @@
int fullScreenFieldID = -1;
Vector boxContainerFields = new Vector();
- boxContainerFields.add( "boxTitle" + id );
- boxContainerFields.add( "boxType" + id );
- boxContainerFields.add( "boxTitleLayout" + id );
- boxContainerFields.add( "boxContentLayout" + id );
+ boxContainerFields.add( "boxTitle" );
+ boxContainerFields.add( "boxType" );
+ boxContainerFields.add( "boxTitleLayout" );
+ boxContainerFields.add( "boxContentLayout" );
boxContainerFields.add( "filesContainer" + id ); // Files Container
boxContainerFields.add( "linksContainer" + id ); // Links Container
boxContainerFields.add( "textContainer" + id ); // Free Text Container