From 2b1c90fa920b695db0e9101faed73a74fd1dcde3 Mon Sep 17 00:00:00 2001 From: Gavin Cornwell Date: Fri, 6 Jul 2007 08:34:38 +0000 Subject: [PATCH] - Fixed rendering issues of large reports and lots of broken links - Fixed IE rendering issues git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6184 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- ...AbstractLinkValidationReportComponent.java | 20 ++++++++++++++----- .../UILinkValidationBrokenFiles.java | 2 +- .../UILinkValidationBrokenForms.java | 3 +-- source/web/css/main.css | 8 +++----- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/source/java/org/alfresco/web/ui/wcm/component/AbstractLinkValidationReportComponent.java b/source/java/org/alfresco/web/ui/wcm/component/AbstractLinkValidationReportComponent.java index a0fb95638f..301ab8b15d 100644 --- a/source/java/org/alfresco/web/ui/wcm/component/AbstractLinkValidationReportComponent.java +++ b/source/java/org/alfresco/web/ui/wcm/component/AbstractLinkValidationReportComponent.java @@ -127,7 +127,7 @@ public abstract class AbstractLinkValidationReportComponent extends SelfRenderin * @param linkState The current link valiation state * @return Comma separated list of broken links */ - protected String getBrokenLinks(String avmPath, LinkValidationState linkState) + protected String getBrokenLinks(FacesContext context, String avmPath, LinkValidationState linkState) { List brokenLinks = linkState.getBrokenLinksForFile(avmPath); StringBuilder builder = new StringBuilder(); @@ -136,13 +136,16 @@ public abstract class AbstractLinkValidationReportComponent extends SelfRenderin { if (first == false) { - builder.append(", "); + builder.append("
"); } else { first = false; } + builder.append(""); builder.append(parseBrokenLink(link)); } @@ -150,7 +153,7 @@ public abstract class AbstractLinkValidationReportComponent extends SelfRenderin } /** - * Removes the virtulisation server host name from the link if appropriate + * Removes the virtaulisation server host name from the link if appropriate * * @param linkUrl The URL that is broken * @return Parsed URL @@ -169,7 +172,14 @@ public abstract class AbstractLinkValidationReportComponent extends SelfRenderin } } - return link; + // truncate the link if it is longer than 100 chars + String title = link; + if (link.length() > 60) + { + link = link.substring(0, 60) + "..."; + } + + return " " + link + ""; } /** @@ -188,7 +198,7 @@ public abstract class AbstractLinkValidationReportComponent extends SelfRenderin out.write(""); + out.write("' style='margin: 5px;' />"); out.write("
"); out.write(fileName); out.write("
"); diff --git a/source/java/org/alfresco/web/ui/wcm/component/UILinkValidationBrokenFiles.java b/source/java/org/alfresco/web/ui/wcm/component/UILinkValidationBrokenFiles.java index 1b1fff8201..140bfd3802 100644 --- a/source/java/org/alfresco/web/ui/wcm/component/UILinkValidationBrokenFiles.java +++ b/source/java/org/alfresco/web/ui/wcm/component/UILinkValidationBrokenFiles.java @@ -126,7 +126,7 @@ public class UILinkValidationBrokenFiles extends AbstractLinkValidationReportCom String filePath = nameAndPath[1]; // build the list of broken links for the file - String brokenLinks = getBrokenLinks(file, linkState); + String brokenLinks = getBrokenLinks(context, file, linkState); // render the row with the appropriate background style out.write("