diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java index 8432cf5518..af7c6d976f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/AbstractADWindowContent.java @@ -571,6 +571,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements private void initFirstTabpanel() { adTabbox.getSelectedTabpanel().query(m_onlyCurrentRows, m_onlyCurrentDays, MRole.getDefault().getMaxQueryRecords()); adTabbox.getSelectedTabpanel().activate(true); + Events.echoEvent(new Event("onPostInit", adTabbox.getComponent())); } /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java index c2610c5850..dd0babc2ef 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/CompositeADTabbox.java @@ -188,6 +188,13 @@ public class CompositeADTabbox extends AbstractADTabbox } }); + layout.addEventListener("onPostInit", new EventListener() { + @Override + public void onEvent(Event event) throws Exception { + layout.invalidate(); + } + }); + return layout; } @@ -303,7 +310,6 @@ public class CompositeADTabbox extends AbstractADTabbox } else tabPanel.setVisible(false); detailPane.setHflex("1"); - detailPane.setStyle("min-height: 200px; overflow-y: visible;"); detailPane.addADTabpanel(tabPanel, tabLabel); tabPanel.setDetailPaneMode(true, isUseVflexForDetailPane()); detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane())); @@ -542,7 +548,7 @@ public class CompositeADTabbox extends AbstractADTabbox detailTab.setDetailPaneMode(true, isUseVflexForDetailPane()); detailPane.setVflex(Boolean.toString(isUseVflexForDetailPane())); if (!ADTabpanel.isUseSplitViewForForm()) { - detailPane.invalidate(); + layout.invalidate(); } } } @@ -645,6 +651,9 @@ public class CompositeADTabbox extends AbstractADTabbox detailPane.updateToolbar(false, true); } else { tabPanel.dynamicDisplay(0); + if (!ADTabpanel.isUseSplitViewForForm() && !headerTab.isGridView()) { + detailPane.invalidate(); + } } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java index b3de44f2ee..63646977bc 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java @@ -91,14 +91,22 @@ public class DetailPane extends Panel implements EventListener { @Override public void onEvent(Event event) throws Exception { fireActivateDetailEvent(); + if (!ADTabpanel.isUseSplitViewForForm()) { + Clients.scrollIntoView(getSelectedADTabpanel()); + } } }); tabbox.setSclass("adwindow-detailpane-tabbox"); + if (!ADTabpanel.isUseSplitViewForForm()) { + LayoutUtils.addSclass("adwindow-detailpane-tabbox-xsplit", tabbox); + } createPopup(); this.setSclass("adwindow-detailpane"); - + if (!ADTabpanel.isUseSplitViewForForm()) { + LayoutUtils.addSclass("adwindow-detailpane-xsplit", this); + } } public int getSelectedIndex() { diff --git a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp index 23c1c50ba2..8b67b7c6cf 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -506,7 +506,12 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none { } .adwindow-detailpane { - min-height: 200px; width: 100%; overflow-y: visible; + width: 100%; + overflow-y: visible; +} + +.adwindow-detailpane-xsplit { + min-height: 200px; } .adwindow-detailpane-tabpanel { @@ -531,12 +536,17 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none { } .adwindow-detailpane-tabbox { - min-height: 200px; width: 99%; margin: auto; + width: 99%; + margin: auto; background-color: #E4E4E4; } +.adwindow-detailpane-tabbox-xsplit .z-tabpanel { + min-height: 200px; +} + .adwindow-gridview-detail { - height: 250px; + height: 40%; } .adwindow-gridview-detail + .z-south-splt {