From fdc105bbd73a0a25e0a2dd63f3b2ba2689863200 Mon Sep 17 00:00:00 2001 From: hieplq Date: Sat, 27 May 2017 19:38:39 +0700 Subject: [PATCH] IDEMPIERE-3377:use light layout component --- .../adempiere/webui/dashboard/DPFavourites.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java index 6016896d59..67115338d1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java @@ -39,17 +39,17 @@ 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.A; -import org.zkoss.zul.Box; -import org.zkoss.zul.Hbox; +import org.zkoss.zul.Hlayout; import org.zkoss.zul.Image; import org.zkoss.zul.Label; +import org.zkoss.zul.Layout; import org.zkoss.zul.Panel; import org.zkoss.zul.Panelchildren; import org.zkoss.zul.Toolbar; import org.zkoss.zul.Toolbarbutton; import org.zkoss.zul.Treeitem; import org.zkoss.zul.Treerow; -import org.zkoss.zul.Vbox; +import org.zkoss.zul.Vlayout; /** * Dashboard item: User favourites @@ -70,7 +70,7 @@ public class DPFavourites extends DashboardPanel implements EventListener public static final String DELETE_FAV_DROPPABLE = "deleteFav"; - private Box bxFav; + private Layout bxFav; private Label lblMsg; @@ -85,7 +85,7 @@ public class DPFavourites extends DashboardPanel implements EventListener Panelchildren favContent = new Panelchildren(); panel.appendChild(favContent); - bxFav = new Vbox(); + bxFav = new Vlayout(); this.setSclass("favourites-box"); favContent.appendChild(bxFav); createFavouritesPanel(); @@ -140,7 +140,8 @@ public class DPFavourites extends DashboardPanel implements EventListener } protected void addNode(int nodeId, String label, String description, String imageSrc, boolean addNewBtn) { - Hbox hbox = new Hbox(); + Layout hbox = new Hlayout(); + hbox.setSclass("favourites-item"); hbox.setSpacing("0px"); bxFav.appendChild(hbox); @@ -319,7 +320,7 @@ public class DPFavourites extends DashboardPanel implements EventListener int Node_ID = Integer.valueOf(value.toString()); if(barDBupdate(false, Node_ID)) { - if (btn.getParent() instanceof Hbox) + if (btn.getParent() instanceof Hlayout) bxFav.removeChild(btn.getParent()); // bxFav.removeChild(btn);