IDEMPIERE-670 Window tree lookup result have the same icon. Do not show folder icon for leaf node.
This commit is contained in:
parent
32f5ee1ad9
commit
267c1ca86a
|
@ -33,6 +33,7 @@ import org.adempiere.webui.util.TreeUtils;
|
||||||
import org.compiere.model.MTreeNode;
|
import org.compiere.model.MTreeNode;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
|
import org.compiere.util.Util;
|
||||||
import org.zkoss.zk.au.out.AuScript;
|
import org.zkoss.zk.au.out.AuScript;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.Executions;
|
import org.zkoss.zk.ui.Executions;
|
||||||
|
@ -243,19 +244,23 @@ public class TreeSearchPanel extends Panel implements EventListener<Event>, Tree
|
||||||
MTreeNode mNode = (MTreeNode) sNode.getData();
|
MTreeNode mNode = (MTreeNode) sNode.getData();
|
||||||
treeValues[i] = mNode.getName();
|
treeValues[i] = mNode.getName();
|
||||||
treeDescription[i] = mNode.getDescription();
|
treeDescription[i] = mNode.getDescription();
|
||||||
String imagePath = mNode.getImagePath();
|
String indicator = mNode.getImageIndiactor();
|
||||||
if (imagePath != null)
|
if (!Util.isEmpty(indicator) || mNode.isSummary())
|
||||||
{
|
{
|
||||||
if (imagePath.startsWith("/images"))
|
String imagePath = mNode.getImagePath();
|
||||||
{
|
if (imagePath != null)
|
||||||
imagePath = ThemeManager.getThemeResource(imagePath.substring(1));
|
{
|
||||||
}
|
if (imagePath.startsWith("/images"))
|
||||||
else if (imagePath.startsWith("images"))
|
{
|
||||||
{
|
imagePath = ThemeManager.getThemeResource(imagePath.substring(1));
|
||||||
imagePath = ThemeManager.getThemeResource(imagePath);
|
}
|
||||||
}
|
else if (imagePath.startsWith("images"))
|
||||||
|
{
|
||||||
|
imagePath = ThemeManager.getThemeResource(imagePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
treeImages[i] = imagePath != null ? imagePath.intern() : null;
|
||||||
}
|
}
|
||||||
treeImages[i] = imagePath != null ? imagePath.intern() : null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue