From 48f6e3b9d74d6cc10368d85aee3b6bc94cbdab78 Mon Sep 17 00:00:00 2001 From: hengsin Date: Mon, 28 Jun 2021 19:50:22 +0800 Subject: [PATCH] IDEMPIERE-4415 Window Toolbar, report popup flickering (#738) * IDEMPIERE-4415 Window Toolbar, report popup flickering - Fix an invalid css selector (z-row-over doesn't exists) - Fix report popup flickering --- .../webui/panel/action/ReportAction.java | 16 ++++++++++------ .../web/theme/default/css/fragment/grid.css.dsp | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java index 4babc591e4..95fbbadc27 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/ReportAction.java @@ -38,6 +38,7 @@ import org.adempiere.webui.component.Panel; import org.adempiere.webui.component.Row; import org.adempiere.webui.component.Rows; import org.adempiere.webui.component.Window; +import org.adempiere.webui.component.ZkCssHelper; import org.adempiere.webui.util.ZKUpdateUtil; import org.adempiere.webui.window.FDialog; import org.compiere.model.GridTab; @@ -58,11 +59,11 @@ import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.util.Clients; +import org.zkoss.zul.Div; import org.zkoss.zul.Filedownload; import org.zkoss.zul.Popup; import org.zkoss.zul.Space; import org.zkoss.zul.Tabpanel; -import org.zkoss.zul.Vbox; import org.zkoss.zul.impl.LabelImageElement; /** @@ -143,22 +144,24 @@ public class ReportAction implements EventListener chkAllColumns.setVisible(AD_PrintFormat_ID == -1); } - Vbox vb = new Vbox(); + Div vb = new Div(); + ZkCssHelper.appendStyle(vb, "display: flex; flex-direction: column;"); ZKUpdateUtil.setWidth(vb, "100%"); + ZKUpdateUtil.setHeight(vb, "200px"); winReport.appendChild(vb); winReport.setSclass("toolbar-popup-window"); vb.setSclass("toolbar-popup-window-cnt"); - vb.setAlign("stretch"); Grid grid = GridFactory.newGridLayout(); + ZkCssHelper.appendStyle(grid, "flex-grow: 1;"); vb.appendChild(grid); Columns columns = new Columns(); Column column = new Column(); - ZKUpdateUtil.setHflex(column, "min"); + column.setWidth("25%"); columns.appendChild(column); column = new Column(); - ZKUpdateUtil.setHflex(column, "1"); + column.setWidth("75%"); columns.appendChild(column); grid.appendChild(columns); @@ -169,7 +172,7 @@ public class ReportAction implements EventListener rows.appendChild(row); row.appendChild(new Label(Msg.translate(Env.getCtx(), "AD_PrintFormat_ID"))); row.appendChild(cboPrintFormat); - ZKUpdateUtil.setHflex(cboPrintFormat, "1"); + cboPrintFormat.setWidth("100%"); cboPrintFormat.addEventListener(Events.ON_SELECT, this); row = new Row(); @@ -202,6 +205,7 @@ public class ReportAction implements EventListener vb.appendChild(confirmPanel); LayoutUtils.addSclass("dialog-footer", confirmPanel); confirmPanel.addActionListener(this); + ZkCssHelper.appendStyle(confirmPanel, "flex-grow: 0;"); } LabelImageElement toolbarItem = panel.getToolbar().getToolbarItem("Report"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/theme/default/css/fragment/grid.css.dsp b/org.adempiere.ui.zk/WEB-INF/src/web/theme/default/css/fragment/grid.css.dsp index 705a39623a..269f20a495 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/web/theme/default/css/fragment/grid.css.dsp +++ b/org.adempiere.ui.zk/WEB-INF/src/web/theme/default/css/fragment/grid.css.dsp @@ -95,10 +95,10 @@ div.z-column-cnt, div.z-grid-header div.z-auxheader-cnt { border: none !important; background-color: transparent !important; } -.grid-layout tr.z-row-over>td.z-row-inner, .grid-layout tr.z-row-over>.z-cell { +.grid-layout tr.z-row:hover>td.z-row-inner, .grid-layout tr.z-row:hover>.z-cell { border: none !important; } -.grid-layout tr.z-row-over>td.z-row-inner, .grid-layout tr.z-row-over>.z-cell { +.grid-layout tr.z-row:hover>td.z-row-inner, .grid-layout tr.z-row:hover>.z-cell { background-image: none !important; }