Merged V2.1 to HEAD

6436: Support for virtualized cookie paths, aggressive cleanup of sockets when virt server is down.
   6439: Fix for WCM-619 & WCM-571
   6440: Encoding of text/html files created inline using the web-client now has sensible default. AWC-1324.
   6442: Fix for WCM-621 (reviewer can not view or run links report)
   6443: Fix for AWC-1488. Dashboard
   6444: Fix for WCM-693 issue with submitting a deleted directory if no workflow associated with web project.
   6445: Icons for use in fix for WCM-522
   6446: Office Add-Ins: Fix for AWC-1481 - Login dialog can appear recursively


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6733 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-10 22:07:27 +00:00
parent a8023d20a2
commit 97b5b391c8
18 changed files with 271 additions and 364 deletions

View File

@@ -46,6 +46,8 @@ public class UICharsetSelector extends UISelectOne
public static final String COMPONENT_TYPE = "org.alfresco.faces.CharsetSelector";
public static final String COMPONENT_FAMILY = "javax.faces.SelectOne";
private static List<SelectItem> charsetEncodings = null;
@Override
@SuppressWarnings("unchecked")
public void encodeBegin(FacesContext context) throws IOException
@@ -75,13 +77,25 @@ public class UICharsetSelector extends UISelectOne
*/
protected List<SelectItem> createList()
{
Map<String, Charset> availableCharsets = Charset.availableCharsets();
List<SelectItem> items = new ArrayList<SelectItem>(availableCharsets.size());
for (Charset charset : availableCharsets.values())
return getCharsetEncodingList();
}
/**
* @return the List of available system character set encodings as a List of SelectItem objects
*/
public static List<SelectItem> getCharsetEncodingList()
{
if (charsetEncodings == null)
{
SelectItem item = new SelectItem(charset.name(), charset.displayName());
items.add(item);
Map<String, Charset> availableCharsets = Charset.availableCharsets();
List<SelectItem> items = new ArrayList<SelectItem>(availableCharsets.size());
for (Charset charset : availableCharsets.values())
{
SelectItem item = new SelectItem(charset.name(), charset.displayName());
items.add(item);
}
charsetEncodings = items;
}
return items;
return charsetEncodings;
}
}

View File

@@ -776,7 +776,7 @@ public class UILinkValidationReport extends AbstractLinkValidationReportComponen
protected String getIcon(String fileName)
{
// work out what icon to use
String icon = "/images/filetypes32/html.gif";
String icon = "/images/filetypes32/_default.gif";
String ext = "";
int idx = fileName.indexOf(".");
if (idx != -1)
@@ -784,7 +784,11 @@ public class UILinkValidationReport extends AbstractLinkValidationReportComponen
ext = fileName.substring(idx);
}
if (ext.equals(".xml"))
if (ext.equals(".html") || ext.equals(".htm"))
{
icon = "/images/filetypes32/html.gif";
}
else if (ext.equals(".xml"))
{
icon = "/images/icons/webform_large.gif";
}