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
@@ -143,7 +143,7 @@
|
|||||||
|
|
||||||
<config evaluator="string-compare" condition="Custom Folder Types">
|
<config evaluator="string-compare" condition="Custom Folder Types">
|
||||||
<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>
|
</folder-types>
|
||||||
</config>
|
</config>
|
||||||
|
|
||||||
@@ -200,21 +200,21 @@
|
|||||||
|
|
||||||
<config evaluator="string-compare" condition="fm:forums icons">
|
<config evaluator="string-compare" condition="fm:forums icons">
|
||||||
<icons>
|
<icons>
|
||||||
<icon name="forums_large" path="/images/icons/forums_large.gif" />
|
<icon name="forums" path="/images/icons/forums.gif" />
|
||||||
</icons>
|
</icons>
|
||||||
</config>
|
</config>
|
||||||
|
|
||||||
<config evaluator="string-compare" condition="fm:forum icons">
|
<config evaluator="string-compare" condition="fm:forum icons">
|
||||||
<icons>
|
<icons>
|
||||||
<icon name="forum_large" path="/images/icons/forum_large.gif" />
|
<icon name="forum" path="/images/icons/forum.gif" />
|
||||||
</icons>
|
</icons>
|
||||||
</config>
|
</config>
|
||||||
|
|
||||||
<config evaluator="string-compare" condition="fm:topic icons">
|
<config evaluator="string-compare" condition="fm:topic icons">
|
||||||
<icons>
|
<icons>
|
||||||
<icon name="topic_large" path="/images/icons/topic_large.gif" />
|
<icon name="topic" path="/images/icons/topic.gif" />
|
||||||
<icon name="topic_exclamation_large" path="/images/icons/topic_exclamation_large.gif" />
|
<icon name="topic_exclamation" path="/images/icons/topic_exclamation.gif" />
|
||||||
<icon name="topic_question_large" path="/images/icons/topic_question_large.gif" />
|
<icon name="topic_question" path="/images/icons/topic_question.gif" />
|
||||||
</icons>
|
</icons>
|
||||||
</config>
|
</config>
|
||||||
|
|
||||||
|
@@ -58,7 +58,6 @@ import org.alfresco.web.app.context.UIContextService;
|
|||||||
import org.alfresco.web.bean.repository.MapNode;
|
import org.alfresco.web.bean.repository.MapNode;
|
||||||
import org.alfresco.web.bean.repository.Node;
|
import org.alfresco.web.bean.repository.Node;
|
||||||
import org.alfresco.web.bean.repository.NodePropertyResolver;
|
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.bean.repository.Repository;
|
||||||
import org.alfresco.web.config.ViewsConfigElement;
|
import org.alfresco.web.config.ViewsConfigElement;
|
||||||
import org.alfresco.web.ui.common.Utils;
|
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.alfresco.web.ui.common.renderer.data.IRichListRenderer;
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bean providing properties and behaviour for the forums screens.
|
* Bean providing properties and behaviour for the forums screens.
|
||||||
@@ -472,7 +470,7 @@ public class ForumsBean implements IContextListener, NodeEventListener
|
|||||||
// create our Node representation
|
// create our Node representation
|
||||||
MapNode node = new MapNode(nodeRef, this.nodeService, true);
|
MapNode node = new MapNode(nodeRef, this.nodeService, true);
|
||||||
node.addPropertyResolver("icon", this.browseBean.resolverSpaceIcon);
|
node.addPropertyResolver("icon", this.browseBean.resolverSpaceIcon);
|
||||||
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
|
node.addPropertyResolver("smallIcon", this.browseBean.resolverSmallIcon);
|
||||||
|
|
||||||
this.forums.add(node);
|
this.forums.add(node);
|
||||||
}
|
}
|
||||||
@@ -481,7 +479,7 @@ public class ForumsBean implements IContextListener, NodeEventListener
|
|||||||
// create our Node representation
|
// create our Node representation
|
||||||
MapNode node = new MapNode(nodeRef, this.nodeService, true);
|
MapNode node = new MapNode(nodeRef, this.nodeService, true);
|
||||||
node.addPropertyResolver("icon", this.browseBean.resolverSpaceIcon);
|
node.addPropertyResolver("icon", this.browseBean.resolverSpaceIcon);
|
||||||
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
|
node.addPropertyResolver("smallIcon", this.browseBean.resolverSmallIcon);
|
||||||
node.addPropertyResolver("replies", this.resolverReplies);
|
node.addPropertyResolver("replies", this.resolverReplies);
|
||||||
|
|
||||||
this.topics.add(node);
|
this.topics.add(node);
|
||||||
@@ -492,7 +490,7 @@ public class ForumsBean implements IContextListener, NodeEventListener
|
|||||||
MapNode node = new MapNode(nodeRef, this.nodeService, true);
|
MapNode node = new MapNode(nodeRef, this.nodeService, true);
|
||||||
|
|
||||||
this.browseBean.setupCommonBindingProperties(node);
|
this.browseBean.setupCommonBindingProperties(node);
|
||||||
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
|
node.addPropertyResolver("smallIcon", this.browseBean.resolverSmallIcon);
|
||||||
node.addPropertyResolver("message", this.resolverContent);
|
node.addPropertyResolver("message", this.resolverContent);
|
||||||
node.addPropertyResolver("replyTo", this.resolverReplyTo);
|
node.addPropertyResolver("replyTo", this.resolverReplyTo);
|
||||||
|
|
||||||
@@ -612,15 +610,6 @@ public class ForumsBean implements IContextListener, NodeEventListener
|
|||||||
|
|
||||||
// add the forums specific action resolver
|
// add the forums specific action resolver
|
||||||
node.addPropertyResolver("beingDiscussed", this.resolverBeingDiscussed);
|
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 NodePropertyResolver resolverBeingDiscussed = new NodePropertyResolver() {
|
||||||
public Object get(Node node) {
|
public Object get(Node node) {
|
||||||
return node.hasAspect(ForumModel.ASPECT_DISCUSSABLE);
|
return node.hasAspect(ForumModel.ASPECT_DISCUSSABLE);
|
||||||
|
BIN
source/web/images/icons/forum-16.gif
Normal file
After Width: | Height: | Size: 1009 B |
Before Width: | Height: | Size: 1009 B After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.5 KiB |
BIN
source/web/images/icons/forums-16.gif
Normal file
After Width: | Height: | Size: 648 B |
Before Width: | Height: | Size: 648 B After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.6 KiB |
BIN
source/web/images/icons/topic-16.gif
Normal file
After Width: | Height: | Size: 581 B |
BIN
source/web/images/icons/topic_exclamation-16.gif
Normal file
After Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 591 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
BIN
source/web/images/icons/topic_question-16.gif
Normal file
After Width: | Height: | Size: 594 B |
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
@@ -68,7 +68,7 @@
|
|||||||
<%-- actions for topics --%>
|
<%-- actions for topics --%>
|
||||||
<a:panel id="forum-actions">
|
<a:panel id="forum-actions">
|
||||||
<td width=32>
|
<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>
|
||||||
<td>
|
<td>
|
||||||
<%-- Summary --%>
|
<%-- Summary --%>
|
||||||
|
@@ -68,7 +68,7 @@
|
|||||||
<%-- actions for forums --%>
|
<%-- actions for forums --%>
|
||||||
<a:panel id="forums-actions">
|
<a:panel id="forums-actions">
|
||||||
<td width=32>
|
<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>
|
||||||
<td>
|
<td>
|
||||||
<%-- Summary --%>
|
<%-- Summary --%>
|
||||||
|