IDEMPIERE-369 Master Detail layout improvements. 1) Added top border for form slip bar. 2) Fixed "When you open a document window and there are no 'day' records - it's opened in insert record mode, but the toolbar is all disabled, no undo or save buttons. After you change any field the toolbar is updated correctly."

This commit is contained in:
Heng Sin Low 2012-10-14 16:23:42 +08:00
parent e915e766b6
commit a32bdcbf51
2 changed files with 19 additions and 4 deletions

View File

@ -451,12 +451,21 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
private void initQueryOnNew(MQuery result) { private void initQueryOnNew(MQuery result) {
GridTab curTab = adTabbox.getSelectedGridTab(); GridTab curTab = adTabbox.getSelectedGridTab();
boolean onNew = false;
if (curTab.isHighVolume() && m_findCreateNew) if (curTab.isHighVolume() && m_findCreateNew)
onNew(); onNew = true;
else if (result == null && curTab.getRowCount() == 0 && Env.isAutoNew(ctx, curWindowNo)) else if (result == null && curTab.getRowCount() == 0 && Env.isAutoNew(ctx, curWindowNo))
onNew(); onNew = true;
else if (!curTab.isReadOnly() && curTab.isQueryNewRecord()) else if (!curTab.isReadOnly() && curTab.isQueryNewRecord())
onNew(); onNew = true;
if (onNew) {
Executions.schedule(AEnv.getDesktop(), new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
onNew();
}
}, new Event("onInsert"));
}
} }
/** /**
@ -1211,7 +1220,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
{ {
adTabbox.updateDetailPaneToolbar(changed, readOnly); adTabbox.updateDetailPaneToolbar(changed, readOnly);
} }
toolbar.enableIgnore(adTabbox.needSave(true, false)); toolbar.enableIgnore(adTabbox.needSave(true, false) ||
adTabbox.getSelectedGridTab().isNew() ||
(adTabbox.getSelectedDetailADTabpanel() != null && adTabbox.getSelectedDetailADTabpanel().getGridTab().isNew()));
if (changed && !readOnly && !toolbar.isSaveEnable() ) { if (changed && !readOnly && !toolbar.isSaveEnable() ) {
if (tabPanel.getGridTab().getRecord_ID() > 0) { if (tabPanel.getGridTab().getRecord_ID() > 0) {

View File

@ -427,6 +427,10 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
height: 250px; height: 250px;
} }
.adwindow-gridview-detail + .z-south-splt {
border-top: 1px solid #C5C5C5;
}
.adwindow-gridview-detail .z-south-body { .adwindow-gridview-detail .z-south-body {
padding-top: 1px; padding-top: 1px;
} }