Author: theute
Date: 2012-02-21 10:54:01 -0500 (Tue, 21 Feb 2012)
New Revision: 8443
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarDashboardPortlet.gtmpl
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl
Log:
- Bug 794376 Navigation labels are shortened but not looking good in multibyte languages
- JBEPP-1421 Navigation labels are shortened but not looking good in multibyte languages
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarDashboardPortlet.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarDashboardPortlet.gtmpl 2012-02-21
15:01:41 UTC (rev 8442)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarDashboardPortlet.gtmpl 2012-02-21
15:54:01 UTC (rev 8443)
@@ -2,6 +2,7 @@
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.portal.webui.util.Util ;
import org.exoplatform.portal.mop.user.UserNode;
+ import org.gatein.common.text.EntityEncoder;
import java.util.Collection;
import javax.portlet.MimeResponse;
import javax.portlet.ResourceURL;
@@ -50,8 +51,8 @@
resolvedLabel = _ctx.appRes("UIUserToolBarDashboard.page." +
node.getLabel());
}
- boolean toolong = (resolvedLabel.length() > 60);
- String label = ( toolong ? resolvedLabel.substring(0, 57) + "..." :
resolvedLabel);
+ boolean toolong = (node.getResolvedLabel.length() > 60);
+ String label = ( toolong ? EntityEncoder.encode(node.getResolvedLabel().substring(0,
57) + "...") : resolvedLabel);
String title = "";
if(toolong) title = "title='$resolvedLabel'";
else title = "";
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl 2012-02-21
15:01:41 UTC (rev 8442)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarGroupPortlet.gtmpl 2012-02-21
15:54:01 UTC (rev 8443)
@@ -4,6 +4,7 @@
import org.exoplatform.webui.organization.OrganizationUtils;
import org.exoplatform.portal.mop.user.UserNode;
import org.exoplatform.portal.mop.user.UserNavigation;
+ import org.gatein.common.text.EntityEncoder;
import javax.portlet.MimeResponse;
import javax.portlet.ResourceURL;
import org.exoplatform.portal.application.PortalRequestContext;
@@ -50,8 +51,8 @@
String actionLink = nodeURL.setNode(node).toString();
String icon = node.getIcon();
if(icon == null) icon = "DefaultPageIcon";
- boolean toolong = (node.getEncodedResolvedLabel().length() > 60);
- String label = ( toolong ? node.getEncodedResolvedLabel().substring(0, 57) +
"..." : node.getEncodedResolvedLabel());
+ boolean toolong = (node.getResolvedLabel().length() > 60);
+ String label = ( toolong ? EntityEncoder.encode(node.getResolvedLabel().substring(0,
57) + "...") : node.getEncodedResolvedLabel());
String title = "";
if(toolong) title = "title='$node.encodedResolvedLabel'";
else title = "";
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl 2012-02-21
15:01:41 UTC (rev 8442)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl 2012-02-21
15:54:01 UTC (rev 8443)
@@ -1,7 +1,7 @@
<%
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.portal.webui.util.Util ;
- import org.gatein.common.text.EntityEncoder;
+ import org.gatein.common.text.EntityEncoder;
import org.exoplatform.commons.utils.HTMLEntityEncoder;
import org.exoplatform.portal.mop.user.UserNode;
import javax.portlet.MimeResponse;
@@ -88,8 +88,8 @@
String href = nodeURL.setNode(node).toString();
String icon = node.getIcon();
if(icon == null) icon = "DefaultPageIcon";
- boolean toolong = (node.getEncodedResolvedLabel().length() > 60);
- String label = ( toolong ? node.getEncodedResolvedLabel().substring(0, 57) +
"..." : node.getEncodedResolvedLabel());
+ boolean toolong = (node.getResolvedLabel().length() > 60);
+ String label = ( toolong ? EntityEncoderencode(node.getResolvedLabel().substring(0, 57)
+ "...") : node.getEncodedResolvedLabel());
String title = "";
if(toolong) title = "title='$node.encodedResolvedLabel()'";
else title = "";
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl 2012-02-21
15:01:41 UTC (rev 8442)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl 2012-02-21
15:54:01 UTC (rev 8443)
@@ -2,7 +2,7 @@
import org.exoplatform.portal.mop.user.UserNode;
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.portal.webui.util.Util;
- import org.gatein.common.text.EntityEncoder;
+ import org.gatein.common.text.EntityEncoder;
import org.exoplatform.commons.utils.HTMLEntityEncoder;
import javax.portlet.MimeResponse;
import org.exoplatform.portal.application.PortalRequestContext;
@@ -53,9 +53,9 @@
String label = node.getEncodedResolvedLabel();
String title = "";
- if(label.length() > 40) {
+ if(node.getResolvedLabel().length() > 40) {
title = label;
- label = label.substring(0,37) + "...";
+ label = EntityEncoder.encode(node.getResolvedLabel(0,37) + "...");
}
def actionLink = "#";
@@ -108,7 +108,7 @@
<span class="$arrowIcon">
<%
String label = node.getEncodedResolvedLabel();
- if(label.length() > 30) label = label.substring(0,29) + "...";
+ if(node.getResolvedLabel().length() > 30) label =
EntityEncoder.encode(node.getResolvedLavel().substring(0,27) + "...");
if(node.getPageRef() != null) {
nodeURL.setNode(node);
nodeURL.setAjax(uicomponent.isUseAjax());