IDEMPIERE 369 - Master Detail Improvements. Fixed for:
- "New Record" and "Copy Record" are not enabling the Save Button - until you change one of the fields - Copy Lines on Sales Order is not refreshing detail - message shows "Copied=1" but doesn't refresh detail - The "Parent Record" is disabled when you navigate to the detail using the "New Record" button on detail
This commit is contained in:
parent
5a9ca8fac3
commit
14f2125874
|
@ -947,7 +947,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
{
|
{
|
||||||
ProcessModalDialog dialog = (ProcessModalDialog) event.getTarget();
|
ProcessModalDialog dialog = (ProcessModalDialog) event.getTarget();
|
||||||
onModalClose(dialog.getProcessInfo());
|
onModalClose(dialog.getProcessInfo());
|
||||||
onRefresh(false, false);
|
onRefresh(true, false);
|
||||||
}
|
}
|
||||||
else if (ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT.equals(event.getName()))
|
else if (ADTabpanel.ON_DYNAMIC_DISPLAY_EVENT.equals(event.getName()))
|
||||||
{
|
{
|
||||||
|
@ -1088,8 +1088,6 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
|
|
||||||
private void updateToolbar()
|
private void updateToolbar()
|
||||||
{
|
{
|
||||||
// toolbar.enableTabNavigation(adTab.getSelectedGridTab()Index > 0,
|
|
||||||
// adTab.getSelectedGridTab()Index < (adTab.getTabCount() - 1));
|
|
||||||
toolbar.enableTabNavigation(breadCrumb.hasParentLink(), adTabbox.getSelectedDetailADTabpanel() != null);
|
toolbar.enableTabNavigation(breadCrumb.hasParentLink(), adTabbox.getSelectedDetailADTabpanel() != null);
|
||||||
|
|
||||||
toolbar.getButton("Attachment").setPressed(adTabbox.getSelectedGridTab().hasAttachment());
|
toolbar.getButton("Attachment").setPressed(adTabbox.getSelectedGridTab().hasAttachment());
|
||||||
|
@ -1108,6 +1106,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
toolbar.enableCustomize(((ADTabpanel)adTabbox.getSelectedTabpanel()).isGridView());
|
toolbar.enableCustomize(((ADTabpanel)adTabbox.getSelectedTabpanel()).isGridView());
|
||||||
else
|
else
|
||||||
toolbar.enableCustomize(false);
|
toolbar.enableCustomize(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1263,12 +1262,10 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
toolbar.enableSave(adTabbox.needSave(true, false));
|
toolbar.enableSave(adTabbox.needSave(true, false) ||
|
||||||
if (detailTab) {
|
adTabbox.getSelectedGridTab().isNew() ||
|
||||||
ToolBarButton btn = toolbar.getButton("SaveCreate");
|
(adTabbox.getSelectedDetailADTabpanel() != null && adTabbox.getSelectedDetailADTabpanel().getGridTab().isNew()));
|
||||||
if (btn != null && !btn.isDisabled())
|
|
||||||
btn.setDisabled(true);
|
|
||||||
}
|
|
||||||
//
|
//
|
||||||
// No Rows
|
// No Rows
|
||||||
if (e.getTotalRows() == 0 && insertRecord && !detailTab)
|
if (e.getTotalRows() == 0 && insertRecord && !detailTab)
|
||||||
|
@ -1435,8 +1432,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
|
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
|
||||||
toolbar.enableNew(false);
|
toolbar.enableNew(false);
|
||||||
toolbar.enableDelete(false);
|
toolbar.enableDelete(false);
|
||||||
breadCrumb.enableNavigation(false);
|
breadCrumb.enableFirstNavigation(adTabbox.getSelectedGridTab().getCurrentRow() > 0);
|
||||||
toolbar.enableTabNavigation(false);
|
breadCrumb.enableLastNavigation(adTabbox.getSelectedGridTab().getCurrentRow() + 1 < adTabbox.getSelectedGridTab().getRowCount());
|
||||||
|
toolbar.enableTabNavigation(breadCrumb.hasParentLink(), adTabbox.getSelectedDetailADTabpanel() != null);
|
||||||
toolbar.enableIgnore(true);
|
toolbar.enableIgnore(true);
|
||||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
||||||
toolbar.enableReport(true);
|
toolbar.enableReport(true);
|
||||||
|
@ -1469,7 +1467,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
|
adTabbox.getSelectedTabpanel().dynamicDisplay(0);
|
||||||
toolbar.enableNew(false);
|
toolbar.enableNew(false);
|
||||||
toolbar.enableDelete(false);
|
toolbar.enableDelete(false);
|
||||||
breadCrumb.enableNavigation(false);
|
breadCrumb.enableFirstNavigation(adTabbox.getSelectedGridTab().getCurrentRow() > 0);
|
||||||
|
breadCrumb.enableLastNavigation(adTabbox.getSelectedGridTab().getCurrentRow() + 1 < adTabbox.getSelectedGridTab().getRowCount());
|
||||||
toolbar.enableTabNavigation(false);
|
toolbar.enableTabNavigation(false);
|
||||||
toolbar.enableIgnore(true);
|
toolbar.enableIgnore(true);
|
||||||
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
toolbar.enablePrint(adTabbox.getSelectedGridTab().isPrinted());
|
||||||
|
|
|
@ -244,26 +244,18 @@ public class BreadCrumb extends Div implements EventListener<Event>{
|
||||||
this.links = null;
|
this.links = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void enableFirstNavigation(boolean enabled)
|
public void enableFirstNavigation(boolean enabled)
|
||||||
{
|
{
|
||||||
this.btnFirst.setDisabled(!enabled);
|
this.btnFirst.setDisabled(!enabled);
|
||||||
this.btnPrevious.setDisabled(!enabled);
|
this.btnPrevious.setDisabled(!enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void enableLastNavigation(boolean enabled)
|
public void enableLastNavigation(boolean enabled)
|
||||||
{
|
{
|
||||||
this.btnLast.setDisabled(!enabled);
|
this.btnLast.setDisabled(!enabled);
|
||||||
this.btnNext.setDisabled(!enabled);
|
this.btnNext.setDisabled(!enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enableNavigation(boolean enabled)
|
|
||||||
{
|
|
||||||
this.btnFirst.setDisabled(!enabled);
|
|
||||||
this.btnPrevious.setDisabled(!enabled);
|
|
||||||
this.btnNext.setDisabled(!enabled);
|
|
||||||
this.btnLast.setDisabled(!enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
private ToolBarButton createButton(String name, String image, String tooltip)
|
private ToolBarButton createButton(String name, String image, String tooltip)
|
||||||
{
|
{
|
||||||
ToolBarButton btn = new ToolBarButton("");
|
ToolBarButton btn = new ToolBarButton("");
|
||||||
|
|
|
@ -456,6 +456,8 @@ public class DetailPane extends Panel implements EventListener<Event> {
|
||||||
btn.setDisabled(!enableNew);
|
btn.setDisabled(!enableNew);
|
||||||
} else if (DELETE_IMAGE.equals(btn.getImage())) {
|
} else if (DELETE_IMAGE.equals(btn.getImage())) {
|
||||||
btn.setDisabled(!enableDelete);
|
btn.setDisabled(!enableDelete);
|
||||||
|
} else if (EDIT_IMAGE.equals(btn.getImage())) {
|
||||||
|
btn.setDisabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue