Author: ktlili
Date: Fri Dec 7 17:12:43 2007
New Revision: 19349
URL: https://svndev.jahia.net/websvn/listing.php?sc=3D1&rev=3D19349&repname=
=3Djahia
Log:
- fix several manage categories bugs + add some resource bundles
Modified:
trunk/core/src/conf/java/JahiaEnginesResources.properties
trunk/core/src/conf/java/JahiaEnginesResources_en.properties
trunk/core/src/conf/java/JahiaEnginesResources_fr.properties
trunk/core/src/java/org/jahia/engines/applications/ManageApplicationCat=
egoriesEngine.java
trunk/core/src/webapp/jsp/jahia/engines/application/application_display=
tag.inc
trunk/core/src/webapp/jsp/jahia/engines/application/application_manage_=
categories.jsp
trunk/core/src/webapp/jsp/jahia/engines/buttons.jsp
Modified: trunk/core/src/conf/java/JahiaEnginesResources.properties
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/conf/j=
ava/JahiaEnginesResources.properties&rev=3D19349&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/conf/java/JahiaEnginesResources.properties (original)
+++ trunk/core/src/conf/java/JahiaEnginesResources.properties Fri Dec 7 17=
:12:43 2007
@@ -943,6 +943,13 @@
org.jahia.engines.shared.Application_Field_displyTag.selectedTab =3D Selec=
tion
org.jahia.engines.shared.Application_Field_displyTag.rolesTab =3D Roles
org.jahia.engines.shared.Application_Field_displyTag.noselectedPortlet =3D=
There is no selected portlet
+# select categories for portlet
+org.jahia.engines.portletCategories.open =3D Manage categories
+org.jahia.engines.portletCategories.open.description =3D Select at least o=
ne portlet before clicking on "Manage categories"
+org.jahia.engines.portletCategories.label =3D Manage portlets categories
+org.jahia.engines.portletCategories.displayTag.categoryColumnTitle =3D Cat=
egories
+org.jahia.engines.portletCategories.categoriesTreeName =3D Categories
+org.jahia.engines.portletCategories.noCatgeories =3D There is no categorie=
s for
=
org.jahia.engines.shared.BigText_Field.alignCenter.label =3D Align Center
org.jahia.engines.shared.BigText_Field.alignJustify.label =3D Align Justify
Modified: trunk/core/src/conf/java/JahiaEnginesResources_en.properties
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/conf/j=
ava/JahiaEnginesResources_en.properties&rev=3D19349&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/conf/java/JahiaEnginesResources_en.properties (original)
+++ trunk/core/src/conf/java/JahiaEnginesResources_en.properties Fri Dec 7=
17:12:43 2007
@@ -942,6 +942,11 @@
org.jahia.engines.shared.Application_Field_displyTag.selectedTab =3D Selec=
tion
org.jahia.engines.shared.Application_Field_displyTag.rolesTab =3D Roles
org.jahia.engines.shared.Application_Field_displyTag.noselectedPortlet =3D=
There is no selected portlet
+# select categories for portlet
+org.jahia.engines.portletCategories.label =3D Manage portlets categories
+org.jahia.engines.portletCategories.displayTag.categoryColumnTitle =3D Cat=
egories
+org.jahia.engines.portletCategories.categoriesTreeName =3D Categories
+org.jahia.engines.portletCategories.noCatgeories =3D There is no categorie=
s for
=
org.jahia.engines.shared.BigText_Field.alignCenter.label =3D Align Center
org.jahia.engines.shared.BigText_Field.alignJustify.label =3D Align Justify
Modified: trunk/core/src/conf/java/JahiaEnginesResources_fr.properties
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/conf/j=
ava/JahiaEnginesResources_fr.properties&rev=3D19349&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/conf/java/JahiaEnginesResources_fr.properties (original)
+++ trunk/core/src/conf/java/JahiaEnginesResources_fr.properties Fri Dec 7=
17:12:43 2007
@@ -656,6 +656,13 @@
org.jahia.engines.shared.Application_Field_displyTag.selectedPortlet.label=
=3D La portlet s=C3=A9lectionn=C3=A9e est:
org.jahia.engines.shared.Application_Field_displyTag.selectedTab =3D S=C3=
=A9lection
org.jahia.engines.shared.Application_Field_displyTag.unselectedPortlet.lab=
el =3D d=C3=A9s=C3=A9lectionner
+# select categories for portlet
+org.jahia.engines.portletCategories.open =3D Gestions des cat=C3=A9gories
+org.jahia.engines.portletCategories.open.description =3D S=C3=A9lectionner=
au moins une portlet avant de cliquer sur "Gestions des cat=C3=A9gories"
+org.jahia.engines.portletCategories.displayTag.categoryColumnTitle =3D Cat=
=C3=A9gories
+org.jahia.engines.portletCategories.categoriesTreeName =3D Cat=C3=A9gories
+org.jahia.engines.portletCategories.noCatgeories =3D Il n'y a aucune cat=
=C3=A9gories s=C3=A9ectionn=C3=A9es pour
+
org.jahia.engines.shared.BigText_Field.WAIerror.label =3D Erreur(s) WAI
org.jahia.engines.shared.BigText_Field.WAIwarning.label =3D Avertissement(=
s) WAI
org.jahia.engines.shared.BigText_Field.alignCenter.label =3D Alignement au=
centre
Modified: trunk/core/src/java/org/jahia/engines/applications/ManageApplicat=
ionCategoriesEngine.java
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/java/o=
rg/jahia/engines/applications/ManageApplicationCategoriesEngine.java&rev=3D=
19349&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/java/org/jahia/engines/applications/ManageApplicationCat=
egoriesEngine.java (original)
+++ trunk/core/src/java/org/jahia/engines/applications/ManageApplicationCat=
egoriesEngine.java Fri Dec 7 17:12:43 2007
@@ -66,6 +66,11 @@
=
public String renderLink(ProcessingContext jParams, Object theObj) thr=
ows JahiaException {
logger.debug("Call renderLink()");
+ String link =3D createEngineUrl(jParams);
+ return link;
+ }
+
+ private String createEngineUrl(ProcessingContext jParams) throws Jahia=
Exception {
String params =3D "&" + PORLET_CATEGORIES + "=3D" + PORLET_CATEGOR=
IES_TRUE;
String link =3D jParams.composeEngineUrl(ManageApplicationCategori=
esEngine.ENGINE_NAME, params);
return link;
@@ -79,14 +84,9 @@
// get screen value
String theScreen =3D jParams.getParameter(SCREEN_STR);
logger.debug("Screen is " + theScreen);
- /*Set s =3D previousEngineMap.entrySet();
- Iterator it =3D s.iterator();
- while (it.hasNext()) {
- String value =3D it.next().toString();
- logger.debug("Found [" + value + "]");
- }*/
=
//case of save
+
if (theScreen !=3D null && !theScreen.equalsIgnoreCase(CANCEL_STR)=
) {
logger.debug("Call Save()");
// get selected object list
@@ -122,7 +122,7 @@
CategoryKey categoryKey =3D (CategoryKey) currentCat.g=
etObjectKey();
=
// add entrypoint point definition
- if(clikedCategories.contains(currentCat)){
+ if (clikedCategories.contains(currentCat)) {
addEntryPointDefinitionToCategory(categoryKey, obj=
Key);
}
=
@@ -210,7 +210,7 @@
}
=
/* init engine map*/
- private HashMap updateEngineMap(ProcessingContext jParams) {
+ private HashMap updateEngineMap(ProcessingContext jParams) throws Jahi=
aException {
logger.debug("Call updateEngineMap();");
HashMap engineMap =3D getEngineMap(jParams);
=
@@ -220,16 +220,15 @@
// put engine name
engineMap.put(ENGINE_NAME_PARAM, ENGINE_NAME);
=
+ // put engine url
+ engineMap.put(ENGINE_URL_PARAM, createEngineUrl(jParams));
+
// put jsp source
String theScreen =3D jParams.getParameter(SCREEN_STR);
if (theScreen !=3D null) {
// sets screen
engineMap.put(SCREEN_STR, theScreen);
- if (theScreen.equals(SAVE_STR)) {
- engineMap.put(JSPSOURCE_STR, CLOSE_STR);
- } else if (theScreen.equals(APPLY_STR)) {
- engineMap.put(JSPSOURCE_STR, APPLY_STR);
- } else if (theScreen.equals(CANCEL_STR)) {
+ if (theScreen.equals(SAVE_STR) || theScreen.equals(CANCEL_STR)=
) {
engineMap.put(JSPSOURCE_STR, CLOSE_STR);
} else {
engineMap.put(JSPSOURCE_STR, ManageApplicationCategoriesEn=
gine.ENGINE_JSP);
Modified: trunk/core/src/webapp/jsp/jahia/engines/application/application_d=
isplaytag.inc
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/webapp=
/jsp/jahia/engines/application/application_displaytag.inc&rev=3D19349&repna=
me=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/webapp/jsp/jahia/engines/application/application_display=
tag.inc (original)
+++ trunk/core/src/webapp/jsp/jahia/engines/application/application_display=
tag.inc Fri Dec 7 17:12:43 2007
@@ -99,7 +99,8 @@
<input type=3D"hidden" name=3D"<%=3DparamPageName%>" value=3D"<%=3DparamPa=
geValue%>"/>
<input type=3D"hidden" name=3D"<%=3DparamSort%>" value=3D"<%=3DparamSortVa=
lue%>"/>
<input type=3D"hidden" name=3D"<%=3DparamOrder%>" value=3D"<%=3DparamOrder=
Value%>"/>
-<a href=3D"javascript:handleActionChange('open_categories');">Manager cate=
gories</a>
+<a href=3D"javascript:handleActionChange('open_categories');"><jahia:engin=
eResourceBundle resourceName=3D"org.jahia.engines.portletCategories.open"/>=
</a>
+<br/> <div align=3D"right"=3D""
<display:table style=3D"width:100%" class=3D"evenOddTable" id=3D"<%=3Dtabl=
eId%>" name=3D"resultRows" export=3D"false" defaultsort=3D"1" pagesize=3D"5=
">
<%
EntryPointDefinition definition =3D (EntryPointDefinition) pageCon=
text.getAttribute(tableId);
Modified: trunk/core/src/webapp/jsp/jahia/engines/application/application_m=
anage_categories.jsp
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/webapp=
/jsp/jahia/engines/application/application_manage_categories.jsp&rev=3D1934=
9&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/webapp/jsp/jahia/engines/application/application_manage_=
categories.jsp (original)
+++ trunk/core/src/webapp/jsp/jahia/engines/application/application_manage_=
categories.jsp Fri Dec 7 17:12:43 2007
@@ -15,21 +15,11 @@
<%@ page language=3D"java" %>
<%@ page import=3D"org.jahia.data.JahiaData" %>
<%@ page import=3D"org.jahia.params.ParamBean" %>
-<%@ page import=3D"org.jahia.data.applications.ApplicationBean" %>
-<%@ page import=3D"org.jahia.engines.applications.*" %>
<%@ page import=3D"org.jahia.data.applications.EntryPointDefinition" %>
-<%@ page import=3D"org.apache.jetspeed.Jetspeed" %>
-<%@ page import=3D"org.apache.jetspeed.components.ComponentManager" %>
-<%@ page import=3D"org.apache.jetspeed.components.portletregistry.PortletR=
egistry" %>
<%@ page import=3D"org.apache.jetspeed.om.common.portlet.MutablePortletApp=
lication" %>
<%@ page import=3D"org.apache.pluto.om.common.Description" %>
<%@ page import=3D"java.util.*" %>
-<%@ page import=3D"org.apache.jetspeed.om.common.UserAttribute" %>
-<%@ page import=3D"org.apache.jetspeed.om.common.UserAttributeRef" %>
-<%@ page import=3D"org.apache.commons.collections.FastHashMap" %>
<%@ page import=3D"org.jahia.taglibs.ajax.ComplexTreeInclude" %>
-<%@ page import=3D"org.displaytag.tags.*" %>
-<%@ page import=3D"org.displaytag.util.*" %>
<%@ page import=3D"org.jahia.resourcebundle.*" %>
<%@ taglib uri=3D"http://displaytag.sourceforge.net/" prefix=3D"display" %>
<%@ taglib uri=3D"JahiaLib" prefix=3D"jahia" %>
@@ -40,35 +30,30 @@
final JahiaData jData =3D (JahiaData) request.getAttribute("org.jahia.=
data.JahiaData");
final ParamBean jParams =3D (ParamBean) request.getAttribute("org.jahi=
a.params.ParamBean");
final HashMap engineMap =3D (HashMap) request.getAttribute("org.jahia.=
engines.EngineHashMap");
+ final Map portletCategoriesMap =3D (Map) engineMap.get("portletCategor=
iesMap");
+ final List selectedPortletsList =3D (List) engineMap.get("selectedObje=
ctList");
=
%>
<%
// display tag declaration
- //final List selectedPortletsList =3D (List) engineMap.get(ManageAppli=
cationCategoriesEngine.SELECTED_PORTLETS_LIST_ATTR);
- final List selectedPortletsList =3D (List) engineMap.get("selectedObje=
ctList");
- final Map portletCategoriesMap =3D (Map) engineMap.get("portletCategor=
iesMap");
-
- MutablePortletApplication app =3D null;
- boolean isPortlet =3D false;
+ request.setAttribute("resultRows", selectedPortletsList);
String titleNameColumn =3D JahiaResourceBundle.getEngineResource("org.=
jahia.engines.shared.Application_Field_displyTag.portletNameColumnTitle.lab=
el", jData.getProcessingContext(), jData.getProcessingContext().getLocale()=
);
String titleDescriptionColumn =3D JahiaResourceBundle.getEngineResourc=
e("org.jahia.engines.shared.Application_Field_displyTag.portletDescriptionC=
olumnTitle.label", jData.getProcessingContext(), jData.getProcessingContext=
().getLocale());
String defaultDescription =3D JahiaResourceBundle.getEngineResource("o=
rg.jahia.engines.shared.Application_Field_displyTag.portletNoDescription.la=
bel", jData.getProcessingContext(), jData.getProcessingContext().getLocale(=
));
- String titleCategorieColumn =3D "Categorie";
+ String titleCategorieColumn =3D JahiaResourceBundle.getEngineResource(=
"org.jahia.engines.portletCategories.displayTag.categoryColumnTitle", jData=
.getProcessingContext(), jData.getProcessingContext().getLocale());
String tableId =3D "porltet_webapps";
- request.setAttribute("resultRows", selectedPortletsList);
-%>
-<%
- // ajax complex tree
- String applicationWarName =3D "Google Gadgets";
- String title =3D "MyTitle";
+
+ // current application
+ MutablePortletApplication app =3D null;
+ boolean isPortlet =3D false;
+
+ // catgeroy tree
+ String titleCategoriesTree =3D JahiaResourceBundle.getEngineResource("=
org.jahia.engines.portletCategories.categoriesTreeName", jData.getProcessin=
gContext(), jData.getProcessingContext().getLocale());
+ String noCatgeories =3D JahiaResourceBundle.getEngineResource("org.jah=
ia.engines.portletCategories.noCatgeories", jData.getProcessingContext(), j=
Data.getProcessingContext().getLocale());
+
%>
<h3 class=3D"template">
- <jahia:engineResourceBundle resourceName=3D"org.jahia.engines.applicat=
ion.applicationSettings.label"/>
- <span> [
- <jahia:engineResourceBundle resourceName=3D"org.jahia.engines.applicat=
ion.applicationName.label"/>
- =3D
-<%=3DapplicationWarName%> ]
-</span>
+ <jahia:engineResourceBundle resourceName=3D"org.jahia.engines.portletC=
ategories.label"/>
</h3>
<!-- End Langs -->
<!-- Buttons -->
@@ -79,7 +64,7 @@
<br/>
<br/>
<br/>
-<display:table class=3D"evenOddTable" id=3D"<%=3DtableId%>" name=3D"result=
Rows" export=3D"false" defaultsort=3D"1" pagesize=3D"5">
+<display:table style=3D"width:100%" class=3D"evenOddTable" id=3D"<%=3Dtabl=
eId%>" name=3D"resultRows" export=3D"false" defaultsort=3D"1" pagesize=3D"5=
">
<%
EntryPointDefinition definition =3D (EntryPointDefinition) pageCon=
text.getAttribute(tableId);
//get id
@@ -103,13 +88,13 @@
}
=
//get Category
- String category =3D "No category";
String currentObjectKey =3D epID + "_" + definitionName;
List categoriesList =3D (List) portletCategoriesMap.get(currentObj=
ectKey);
+ String category;
if (categoriesList !=3D null) {
category =3D categoriesList.toString();
} else {
- category =3D "there is no category for: [" + currentObjectKey =
+ "]";
+ category =3D noCatgeories + " [" + currentObjectKey + "]";
}
=
%>
@@ -132,7 +117,8 @@
<br/>
=
<div>
- <ajax:complexTreeInclude divID=3D"tree1" style=3D"<%=3DComplexTreeIncl=
ude.PORTLET_CATEGORY_STYLE%>" title=3D"<%=3Dtitle%>"
+ <ajax:complexTreeInclude divID=3D"tree1" style=3D"<%=3DComplexTreeIncl=
ude.PORTLET_CATEGORY_STYLE%>"
+ title=3D"<%=3DtitleCategoriesTree%>"
entryPointKey=3D"/"/>
</div>
<div class=3D"clearing"></div>
\ No newline at end of file
Modified: trunk/core/src/webapp/jsp/jahia/engines/buttons.jsp
URL: https://svndev.jahia.net/websvn/diff.php?path=3D/trunk/core/src/webapp=
/jsp/jahia/engines/buttons.jsp&rev=3D19349&repname=3Djahia
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/core/src/webapp/jsp/jahia/engines/buttons.jsp (original)
+++ trunk/core/src/webapp/jsp/jahia/engines/buttons.jsp Fri Dec 7 17:12:43=
2007
@@ -98,7 +98,7 @@
<% } %>
<% } %>
<div class=3D"button">
- <a href=3D"javascript:window.close();" <% if (results =3D=3D null =
&& !"filemanager_fileedit".equals(jspSource)) { %>
+ <a href=3D"javascript:window.close();" <% if (lockKey !=3D null &&=
results =3D=3D null && !"filemanager_fileedit".equals(jspSource)) { %>
onclick=3D"releaseLock('<%=3D((LockKey)engineMap.get("lock")).g=
etType()%>', <%=3DjParams.getPageID()%> , <%=3Dsession.getAttribute("needTo=
RefreshParentPage") !=3D null%>)" <% } %>
title=3D"<jahia:engineResourceBundle resourceName=3D"org.jahia.=
altCloseWithoutSave.label"/>">
<jahia:engineResourceBundle resourceName=3D"org.jahia.button.c=
ancel"/>
_______________________________________________
cvs_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/cvs_list