IDEMPIERE-1275 Accounting Dimensions Navigation is broken.
This commit is contained in:
parent
28f2fa1c06
commit
2ab43bafcd
|
@ -493,4 +493,8 @@ public class BreadCrumb extends Div implements EventListener<Event> {
|
||||||
public ToolBarButton getPreviousButton() {
|
public ToolBarButton getPreviousButton() {
|
||||||
return btnPrevious;
|
return btnPrevious;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEmpty() {
|
||||||
|
return layout == null || layout.getChildren().isEmpty();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -350,8 +350,7 @@ public class CompositeADTabbox extends AbstractADTabbox
|
||||||
if (layout.getChildren().isEmpty()) {
|
if (layout.getChildren().isEmpty()) {
|
||||||
layout.appendChild(tabPanel);
|
layout.appendChild(tabPanel);
|
||||||
headerTab = tabPanel;
|
headerTab = tabPanel;
|
||||||
updateBreadCrumb();
|
} else if (tabLabel.tabLevel == 1) {
|
||||||
} else if (tabLabel.tabLevel <= 1) {
|
|
||||||
if (headerTab.getDetailPane() == null) {
|
if (headerTab.getDetailPane() == null) {
|
||||||
headerTab.setDetailPane(createDetailPane());
|
headerTab.setDetailPane(createDetailPane());
|
||||||
} else
|
} else
|
||||||
|
@ -360,7 +359,7 @@ public class CompositeADTabbox extends AbstractADTabbox
|
||||||
headerTab.getDetailPane().addADTabpanel(tabPanel, tabLabel);
|
headerTab.getDetailPane().addADTabpanel(tabPanel, tabLabel);
|
||||||
tabPanel.setDetailPaneMode(true);
|
tabPanel.setDetailPaneMode(true);
|
||||||
headerTab.getDetailPane().setVflex("true");
|
headerTab.getDetailPane().setVflex("true");
|
||||||
} else {
|
} else if (tabLabel.tabLevel > 1){
|
||||||
headerTab.getDetailPane().addADTabpanel(tabPanel, tabLabel, false);
|
headerTab.getDetailPane().addADTabpanel(tabPanel, tabLabel, false);
|
||||||
tabPanel.setDetailPaneMode(true);
|
tabPanel.setDetailPaneMode(true);
|
||||||
headerTab.getDetailPane().setVflex("true");
|
headerTab.getDetailPane().setVflex("true");
|
||||||
|
@ -372,6 +371,18 @@ public class CompositeADTabbox extends AbstractADTabbox
|
||||||
tabPanel.getGridTab().addDataStatusListener(new SyncDataStatusListener(tabPanel));
|
tabPanel.getGridTab().addDataStatusListener(new SyncDataStatusListener(tabPanel));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean updateSelectedIndex(int oldIndex, int newIndex) {
|
||||||
|
boolean b = super.updateSelectedIndex(oldIndex, newIndex);
|
||||||
|
if (b) {
|
||||||
|
BreadCrumb breadcrumb = getBreadCrumb();
|
||||||
|
if (breadcrumb.isEmpty()) {
|
||||||
|
updateBreadCrumb();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return b;
|
||||||
|
}
|
||||||
|
|
||||||
private void activateDetailIfVisible() {
|
private void activateDetailIfVisible() {
|
||||||
if (headerTab instanceof ADTabpanel) {
|
if (headerTab instanceof ADTabpanel) {
|
||||||
((ADTabpanel)headerTab).activateDetailIfVisible();
|
((ADTabpanel)headerTab).activateDetailIfVisible();
|
||||||
|
@ -460,7 +471,7 @@ public class CompositeADTabbox extends AbstractADTabbox
|
||||||
IADTabpanel tabPanel = tabPanelList.get(i);
|
IADTabpanel tabPanel = tabPanelList.get(i);
|
||||||
int tabLevel = tabPanel.getTabLevel();
|
int tabLevel = tabPanel.getTabLevel();
|
||||||
ADTabListModel.ADTabLabel tabLabel = tabLabelList.get(i);
|
ADTabListModel.ADTabLabel tabLabel = tabLabelList.get(i);
|
||||||
if ((tabLevel - currentLevel) == 1 || (tabLevel == 0 && currentLevel == 0)) {
|
if ((tabLevel - currentLevel) == 1) {
|
||||||
tabIndex++;
|
tabIndex++;
|
||||||
Object[] value = new Object[]{tabIndex, tabPanel, tabLabel, Boolean.TRUE};
|
Object[] value = new Object[]{tabIndex, tabPanel, tabLabel, Boolean.TRUE};
|
||||||
list.add(value);
|
list.add(value);
|
||||||
|
@ -593,20 +604,39 @@ public class CompositeADTabbox extends AbstractADTabbox
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(int i = parentIndex+1; i < tabLabelList.size(); i++) {
|
if (headerTab.getTabLevel() == 0)
|
||||||
if (i == selectedIndex) continue;
|
{
|
||||||
|
for(int i = 0; i < tabLabelList.size(); i++) {
|
||||||
|
if (i == selectedIndex) continue;
|
||||||
|
tabLabel = tabLabelList.get(i);
|
||||||
|
if (tabLabel.tabLevel == headerTab.getTabLevel()) {
|
||||||
|
IADTabpanel adtab = tabPanelList.get(i);
|
||||||
|
if (adtab.getDisplayLogic() != null && adtab.getDisplayLogic().trim().length() > 0) {
|
||||||
|
if (!Evaluator.evaluateLogic(headerTab, adtab.getDisplayLogic())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
links.put(Integer.toString(i), tabLabel.label);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for(int i = parentIndex+1; i < tabLabelList.size(); i++) {
|
||||||
|
if (i == selectedIndex) continue;
|
||||||
|
|
||||||
tabLabel = tabLabelList.get(i);
|
tabLabel = tabLabelList.get(i);
|
||||||
if (tabLabel.tabLevel == headerTab.getTabLevel()) {
|
if (tabLabel.tabLevel == headerTab.getTabLevel()) {
|
||||||
IADTabpanel adtab = tabPanelList.get(i);
|
IADTabpanel adtab = tabPanelList.get(i);
|
||||||
if (adtab.getDisplayLogic() != null && adtab.getDisplayLogic().trim().length() > 0) {
|
if (adtab.getDisplayLogic() != null && adtab.getDisplayLogic().trim().length() > 0) {
|
||||||
if (!Evaluator.evaluateLogic(headerTab, adtab.getDisplayLogic())) {
|
if (!Evaluator.evaluateLogic(headerTab, adtab.getDisplayLogic())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
links.put(Integer.toString(i), tabLabel.label);
|
links.put(Integer.toString(i), tabLabel.label);
|
||||||
} else if (tabLabel.tabLevel < headerTab.getTabLevel()) {
|
} else if (tabLabel.tabLevel < headerTab.getTabLevel()) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -176,5 +176,6 @@ public interface IADTabbox extends UIPart {
|
||||||
/**
|
/**
|
||||||
* @return true if all the tabs of detail pane have been linked up with adtabpanel
|
* @return true if all the tabs of detail pane have been linked up with adtabpanel
|
||||||
*/
|
*/
|
||||||
boolean isDetailPaneLoaded();
|
public boolean isDetailPaneLoaded();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue