From 631f4f6989f010ab4d0296d10057b24992fbfeeb Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 23 May 2013 18:23:57 +0800 Subject: [PATCH] IDEMPIERE-724 Zk: Make iDempiere theme more easily customizable. Added z-group-header-body div for easier customization. --- .../src/org/adempiere/webui/component/Group.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Group.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Group.java index c10087c9da..4971aa5d1d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Group.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Group.java @@ -9,6 +9,7 @@ import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; import org.zkoss.zul.Cell; +import org.zkoss.zul.Div; import org.zkoss.zul.Image; import org.zkoss.zul.Label; import org.zkoss.zul.Row; @@ -104,15 +105,19 @@ public class Group extends org.zkoss.zul.Group { { setZclass("z-group-header"); + Div div = new Div(); + div.setZclass("z-group-header-body"); + appendChild(div); + img = new Image(); img.setZclass("z-group-img"); - appendChild(img); + div.appendChild(img); img.addEventListener(Events.ON_CLICK, this); lbl = new Label(); lbl.setStyle("cursor: pointer"); lbl.addEventListener(Events.ON_CLICK, this); - appendChild(lbl); + div.appendChild(lbl); } public String getTitle() { @@ -138,10 +143,7 @@ public class Group extends org.zkoss.zul.Group { { if (e.getName().equals(Events.ON_CLICK)) { -// if (e.getTarget() == img) -// { - ((Group) getParent()).setOpen(!isOpen()); -// } + ((Group) getParent()).setOpen(!isOpen()); } } }