hg merge e29fe52f1f00

This commit is contained in:
Carlos Ruiz 2012-11-23 10:17:17 -05:00
commit 89c9a7a2ed
5 changed files with 46 additions and 10 deletions

View File

@ -204,14 +204,22 @@ public class GridWindow implements Serializable
mTab.setLinkColumnName((String)parents.get(0));
else
{
GridTab parentTab = null;
// More than one parent.
// Search prior tabs for the "right parent"
// for all previous tabs
for (int i = 0; i < index; i++)
{
if (m_tabs.get(i).getTabLevel() + 1 == mTab.getTabLevel()) {
parentTab = m_tabs.get(i);
break;
}
}
if (parentTab != null)
{
// we have a tab
GridTab tab = (GridTab)m_tabs.get(i);
String tabKey = tab.getKeyColumnName(); // may be ""
String tabKey = parentTab.getKeyColumnName(); // may be ""
// look, if one of our parents is the key of that tab
for (int j = 0; j < parents.size(); j++)
{
@ -223,8 +231,8 @@ public class GridWindow implements Serializable
}
// The tab could have more than one key, look into their parents
if (tabKey.equals(""))
for (int k = 0; k < tab.getParentColumnNames().size(); k++)
if (parent.equals(tab.getParentColumnNames().get(k)))
for (int k = 0; k < parentTab.getParentColumnNames().size(); k++)
if (parent.equals(parentTab.getParentColumnNames().get(k)))
{
mTab.setLinkColumnName(parent);
break;

View File

@ -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()));
}
/**

View File

@ -188,6 +188,13 @@ public class CompositeADTabbox extends AbstractADTabbox
}
});
layout.addEventListener("onPostInit", new EventListener<Event>() {
@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();
}
}
}

View File

@ -91,14 +91,22 @@ public class DetailPane extends Panel implements EventListener<Event> {
@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() {

View File

@ -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 {