From 267c1ca86a5e2b94cd17941a548ceb2e2bf4ea2f Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Fri, 3 May 2013 15:44:51 +0800 Subject: [PATCH] IDEMPIERE-670 Window tree lookup result have the same icon. Do not show folder icon for leaf node. --- .../webui/panel/TreeSearchPanel.java | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java index e24f491a39..70d21e73a0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/TreeSearchPanel.java @@ -33,6 +33,7 @@ import org.adempiere.webui.util.TreeUtils; import org.compiere.model.MTreeNode; import org.compiere.util.Env; import org.compiere.util.Msg; +import org.compiere.util.Util; import org.zkoss.zk.au.out.AuScript; import org.zkoss.zk.ui.Component; import org.zkoss.zk.ui.Executions; @@ -243,19 +244,23 @@ public class TreeSearchPanel extends Panel implements EventListener, Tree MTreeNode mNode = (MTreeNode) sNode.getData(); treeValues[i] = mNode.getName(); treeDescription[i] = mNode.getDescription(); - String imagePath = mNode.getImagePath(); - if (imagePath != null) + String indicator = mNode.getImageIndiactor(); + if (!Util.isEmpty(indicator) || mNode.isSummary()) { - if (imagePath.startsWith("/images")) - { - imagePath = ThemeManager.getThemeResource(imagePath.substring(1)); - } - else if (imagePath.startsWith("images")) - { - imagePath = ThemeManager.getThemeResource(imagePath); - } + String imagePath = mNode.getImagePath(); + if (imagePath != null) + { + if (imagePath.startsWith("/images")) + { + imagePath = ThemeManager.getThemeResource(imagePath.substring(1)); + } + else if (imagePath.startsWith("images")) + { + imagePath = ThemeManager.getThemeResource(imagePath); + } + } + treeImages[i] = imagePath != null ? imagePath.intern() : null; } - treeImages[i] = imagePath != null ? imagePath.intern() : null; } }