Changed forums icons to use browse bean's small icon resolver and required patch

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2513 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2006-03-02 22:33:32 +00:00
parent f4d5717bd4
commit f9b3b74dea
18 changed files with 11 additions and 40 deletions

View File

@@ -143,7 +143,7 @@
<config evaluator="string-compare" condition="Custom Folder Types">
<folder-types>
<type name="fm:forums" icon="/images/icons/forums_large.gif" descriptionMsgId="forums_desc" />
<type name="fm:forums" icon="/images/icons/forums.gif" descriptionMsgId="forums_desc" />
</folder-types>
</config>
@@ -200,21 +200,21 @@
<config evaluator="string-compare" condition="fm:forums icons">
<icons>
<icon name="forums_large" path="/images/icons/forums_large.gif" />
<icon name="forums" path="/images/icons/forums.gif" />
</icons>
</config>
<config evaluator="string-compare" condition="fm:forum icons">
<icons>
<icon name="forum_large" path="/images/icons/forum_large.gif" />
<icon name="forum" path="/images/icons/forum.gif" />
</icons>
</config>
<config evaluator="string-compare" condition="fm:topic icons">
<icons>
<icon name="topic_large" path="/images/icons/topic_large.gif" />
<icon name="topic_exclamation_large" path="/images/icons/topic_exclamation_large.gif" />
<icon name="topic_question_large" path="/images/icons/topic_question_large.gif" />
<icon name="topic" path="/images/icons/topic.gif" />
<icon name="topic_exclamation" path="/images/icons/topic_exclamation.gif" />
<icon name="topic_question" path="/images/icons/topic_question.gif" />
</icons>
</config>

View File

@@ -58,7 +58,6 @@ import org.alfresco.web.app.context.UIContextService;
import org.alfresco.web.bean.repository.MapNode;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.NodePropertyResolver;
import org.alfresco.web.bean.repository.QNameNodeMap;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.config.ViewsConfigElement;
import org.alfresco.web.ui.common.Utils;
@@ -69,7 +68,6 @@ import org.alfresco.web.ui.common.component.data.UIRichList;
import org.alfresco.web.ui.common.renderer.data.IRichListRenderer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.util.StringUtils;
/**
* Bean providing properties and behaviour for the forums screens.
@@ -472,7 +470,7 @@ public class ForumsBean implements IContextListener, NodeEventListener
// create our Node representation
MapNode node = new MapNode(nodeRef, this.nodeService, true);
node.addPropertyResolver("icon", this.browseBean.resolverSpaceIcon);
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
node.addPropertyResolver("smallIcon", this.browseBean.resolverSmallIcon);
this.forums.add(node);
}
@@ -481,7 +479,7 @@ public class ForumsBean implements IContextListener, NodeEventListener
// create our Node representation
MapNode node = new MapNode(nodeRef, this.nodeService, true);
node.addPropertyResolver("icon", this.browseBean.resolverSpaceIcon);
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
node.addPropertyResolver("smallIcon", this.browseBean.resolverSmallIcon);
node.addPropertyResolver("replies", this.resolverReplies);
this.topics.add(node);
@@ -492,7 +490,7 @@ public class ForumsBean implements IContextListener, NodeEventListener
MapNode node = new MapNode(nodeRef, this.nodeService, true);
this.browseBean.setupCommonBindingProperties(node);
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
node.addPropertyResolver("smallIcon", this.browseBean.resolverSmallIcon);
node.addPropertyResolver("message", this.resolverContent);
node.addPropertyResolver("replyTo", this.resolverReplyTo);
@@ -612,15 +610,6 @@ public class ForumsBean implements IContextListener, NodeEventListener
// add the forums specific action resolver
node.addPropertyResolver("beingDiscussed", this.resolverBeingDiscussed);
// override the small icon resolver if it's a forum model type
if (type.equals(ForumModel.TYPE_FORUMS) ||
type.equals(ForumModel.TYPE_FORUM) ||
type.equals(ForumModel.TYPE_TOPIC))
{
// override icon handling for forum objects - as we have a specific small icon set
node.addPropertyResolver("smallIcon", resolverSmallIcon);
}
}
@@ -915,24 +904,6 @@ public class ForumsBean implements IContextListener, NodeEventListener
}
};
public NodePropertyResolver resolverSmallIcon = new NodePropertyResolver() {
public Object get(Node node) {
QNameNodeMap props = (QNameNodeMap)node.getProperties();
String icon = (String)props.getRaw("app:icon");
if (icon != null)
{
icon = StringUtils.replace(icon, "_large", "");
}
else
{
icon = BrowseBean.SPACE_SMALL_DEFAULT;
}
return icon;
}
};
public NodePropertyResolver resolverBeingDiscussed = new NodePropertyResolver() {
public Object get(Node node) {
return node.hasAspect(ForumModel.ASPECT_DISCUSSABLE);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1009 B

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 648 B

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 591 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 594 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 594 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -68,7 +68,7 @@
<%-- actions for topics --%>
<a:panel id="forum-actions">
<td width=32>
<h:graphicImage id="space-logo" url="/images/icons/forum_large.gif" width="32" height="32" />
<h:graphicImage id="space-logo" url="/images/icons/forum.gif" width="32" height="32" />
</td>
<td>
<%-- Summary --%>

View File

@@ -68,7 +68,7 @@
<%-- actions for forums --%>
<a:panel id="forums-actions">
<td width=32>
<h:graphicImage id="space-logo" url="/images/icons/forums_large.gif" width="32" height="32" />
<h:graphicImage id="space-logo" url="/images/icons/forums.gif" width="32" height="32" />
</td>
<td>
<%-- Summary --%>