mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- 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
This commit is contained in:
@@ -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<String> 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("<br/>");
|
||||
}
|
||||
else
|
||||
{
|
||||
first = false;
|
||||
}
|
||||
|
||||
builder.append("<img src='");
|
||||
builder.append(context.getExternalContext().getRequestContextPath());
|
||||
builder.append("/images/icons/broken_link.gif' style='vertical-align: -4px;' />");
|
||||
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 "<span title='" + title + "'> " + link + "</span>";
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -188,7 +198,7 @@ public abstract class AbstractLinkValidationReportComponent extends SelfRenderin
|
||||
out.write("<table cellpadding='0' cellspacing='0'><tr><td valign='top'><img src='");
|
||||
out.write(context.getExternalContext().getRequestContextPath());
|
||||
out.write(getIcon(fileName));
|
||||
out.write("' style='padding: 5px;' /></td>");
|
||||
out.write("' style='margin: 5px;' /></td>");
|
||||
out.write("<td width='100%'><div style='padding: 5px;'><div style='font-weight: bold;'>");
|
||||
out.write(fileName);
|
||||
out.write("</div><div style='padding-top: 2px;'>");
|
||||
|
@@ -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("<tr class='");
|
||||
|
@@ -35,7 +35,6 @@ import org.alfresco.service.cmr.avm.AVMService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
import org.alfresco.web.bean.wcm.AVMNode;
|
||||
import org.alfresco.web.bean.wcm.AVMUtil;
|
||||
import org.alfresco.web.bean.wcm.LinkValidationState;
|
||||
import org.alfresco.web.ui.common.Utils;
|
||||
import org.alfresco.web.ui.repo.component.UIActions;
|
||||
@@ -166,7 +165,7 @@ public class UILinkValidationBrokenForms extends AbstractLinkValidationReportCom
|
||||
String filePath = nameAndPath[1];
|
||||
|
||||
// build the list of broken links for the file
|
||||
String brokenLinks = getBrokenLinks(brokenFile, linkState);
|
||||
String brokenLinks = getBrokenLinks(context, brokenFile, linkState);
|
||||
renderFile(out, context, fileName, filePath, brokenLinks);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user