IDEMPIERE-4952 Image icon missing for Notice, Request, Product and Business Partner tab / ZK_THEME_USE_FONT_ICON_FOR_IMAGE (#892)

This commit is contained in:
Carlos Ruiz 2021-09-21 17:15:08 +02:00 committed by GitHub
parent cfb9f4ab33
commit c27b31d6cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -22,6 +22,7 @@ import java.util.HashSet;
import java.util.Set;
import org.adempiere.webui.adwindow.ADWindow;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ManageImageCache;
import org.compiere.model.MImage;
import org.compiere.model.MInfoWindow;
@ -99,9 +100,14 @@ public class Tab extends org.zkoss.zul.Tab
public void decorate (LabelImageElement comp){
if (imageIntenalUrl != null) {
if (ThemeManager.isUseFontIconForImage()) {
String iconClass = imageIntenalUrl.getFile().replace("16.png", "").replaceAll(".*\\/", "");
comp.setIconSclass("z-icon-" + iconClass);
} else {
Image image = ManageImageCache.instance().getImage(imageIntenalUrl);
if (image != null)
comp.setImageContent(image);
}
} else if (imageKey != null){
Image ico = ManageImageCache.instance().getImage(imageKey);
if (ico != null)