IDEMPIERE-4744 Minor improvements to Quick Form / Stay in Parent tab (#1239)
This commit is contained in:
parent
1a51e92c42
commit
2c08060361
|
@ -1199,7 +1199,15 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
/**
|
||||
* Invoke when quick form is click
|
||||
*/
|
||||
public void onQuickForm()
|
||||
public void onQuickForm() {
|
||||
onQuickForm(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Invoke when quick form is click
|
||||
* @param focusTabAtEnd the tab to return when finished
|
||||
*/
|
||||
public void onQuickForm(boolean stayInParent)
|
||||
{
|
||||
logger.log(Level.FINE, "Invoke Quick Form");
|
||||
// Prevent to open Quick Form if already opened.
|
||||
|
@ -1227,6 +1235,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
form.setMaximizable(true);
|
||||
form.setMaximized(true);
|
||||
form.setPosition("center");
|
||||
form.setStayInParent(stayInParent);
|
||||
ZKUpdateUtil.setWindowHeightX(form, 550);
|
||||
ZKUpdateUtil.setWindowWidthX(form, 900);
|
||||
ZkCssHelper.appendStyle(form, "z-index: 900;");
|
||||
|
@ -3995,6 +4004,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
|||
public GridWindow getGridWindow() {
|
||||
return gridWindow;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set component of last focus editor.
|
||||
|
|
|
@ -188,7 +188,7 @@ public class CompositeADTabbox extends AbstractADTabbox
|
|||
if (result)
|
||||
{
|
||||
onEditDetail(row, formView);
|
||||
adWindowPanel.onQuickForm();
|
||||
adWindowPanel.onQuickForm(true);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -83,6 +83,8 @@ public class WQuickForm extends Window implements IQuickForm
|
|||
|
||||
private int windowNo;
|
||||
|
||||
private boolean stayInParent;
|
||||
|
||||
public WQuickForm(AbstractADWindowContent winContent, boolean m_onlyCurrentRows, int m_onlyCurrentDays)
|
||||
{
|
||||
super();
|
||||
|
@ -405,6 +407,10 @@ public class WQuickForm extends Window implements IQuickForm
|
|||
adWinContent.setCurrQGV(null);
|
||||
}
|
||||
adWinContent.getADTab().getSelectedTabpanel().query(onlyCurrentRows, onlyCurrentDays, MRole.getDefault().getMaxQueryRecords()); // autoSize
|
||||
|
||||
if (stayInParent) {
|
||||
adWinContent.onParentRecord();
|
||||
}
|
||||
} // dispose
|
||||
|
||||
private void createNewRow( )
|
||||
|
@ -437,4 +443,13 @@ public class WQuickForm extends Window implements IQuickForm
|
|||
int col = e.getChangedColumn();
|
||||
quickGridView.dynamicDisplay(col);
|
||||
} // dataStatusChanged
|
||||
|
||||
/**
|
||||
* Return to parent when closing the quick form
|
||||
* @param stayInParent
|
||||
*/
|
||||
public void setStayInParent(boolean stayInParent) {
|
||||
this.stayInParent = stayInParent;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue