mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fixed small icon display issue in details view
Fixed unreported error with topic deletion git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2330 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -71,6 +71,7 @@ import org.alfresco.web.ui.repo.component.UINodePath;
|
||||
import org.alfresco.web.ui.repo.component.UISimpleSearch;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.log4j.Priority;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Bean providing properties and behaviour for the main folder/document browse screen and
|
||||
@@ -531,6 +532,7 @@ public class BrowseBean implements IContextListener
|
||||
// create our Node representation
|
||||
MapNode node = new MapNode(nodeRef, this.nodeService, true);
|
||||
node.addPropertyResolver("icon", this.resolverSpaceIcon);
|
||||
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
|
||||
node.addPropertyResolver("beingDiscussed", this.resolverBeingDiscussed);
|
||||
|
||||
this.containerNodes.add(node);
|
||||
@@ -648,6 +650,7 @@ public class BrowseBean implements IContextListener
|
||||
node.addPropertyResolver("path", this.resolverPath);
|
||||
node.addPropertyResolver("displayPath", this.resolverDisplayPath);
|
||||
node.addPropertyResolver("icon", this.resolverSpaceIcon);
|
||||
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
|
||||
node.addPropertyResolver("beingDiscussed", this.resolverBeingDiscussed);
|
||||
|
||||
this.containerNodes.add(node);
|
||||
@@ -814,6 +817,29 @@ public class BrowseBean implements IContextListener
|
||||
}
|
||||
};
|
||||
|
||||
public NodePropertyResolver resolverSmallIcon = new NodePropertyResolver() {
|
||||
public Object get(Node node) {
|
||||
QNameNodeMap props = (QNameNodeMap)node.getProperties();
|
||||
|
||||
String icon = "space_small";
|
||||
|
||||
// we know we have small versions of the forum space types so use them!
|
||||
QName nodeType = node.getType();
|
||||
if (nodeType.equals(ForumModel.TYPE_FORUMS) || nodeType.equals(ForumModel.TYPE_FORUM) ||
|
||||
nodeType.equals(ForumModel.TYPE_TOPIC))
|
||||
{
|
||||
String storedIcon = (String)props.getRaw("app:icon");
|
||||
|
||||
if (storedIcon != null)
|
||||
{
|
||||
icon = StringUtils.replace(storedIcon, "_large", "");
|
||||
}
|
||||
}
|
||||
|
||||
return icon;
|
||||
}
|
||||
};
|
||||
|
||||
public NodePropertyResolver resolverMimetype = new NodePropertyResolver() {
|
||||
public Object get(Node node) {
|
||||
ContentData content = (ContentData)node.getProperties().get(ContentModel.PROP_CONTENT);
|
||||
|
Reference in New Issue
Block a user