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
|
* 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");
|
logger.log(Level.FINE, "Invoke Quick Form");
|
||||||
// Prevent to open Quick Form if already opened.
|
// Prevent to open Quick Form if already opened.
|
||||||
|
|
@ -1227,6 +1235,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
form.setMaximizable(true);
|
form.setMaximizable(true);
|
||||||
form.setMaximized(true);
|
form.setMaximized(true);
|
||||||
form.setPosition("center");
|
form.setPosition("center");
|
||||||
|
form.setStayInParent(stayInParent);
|
||||||
ZKUpdateUtil.setWindowHeightX(form, 550);
|
ZKUpdateUtil.setWindowHeightX(form, 550);
|
||||||
ZKUpdateUtil.setWindowWidthX(form, 900);
|
ZKUpdateUtil.setWindowWidthX(form, 900);
|
||||||
ZkCssHelper.appendStyle(form, "z-index: 900;");
|
ZkCssHelper.appendStyle(form, "z-index: 900;");
|
||||||
|
|
@ -3996,6 +4005,7 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
return gridWindow;
|
return gridWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* set component of last focus editor.
|
* set component of last focus editor.
|
||||||
* Use in onClose/Exit to restore focus
|
* Use in onClose/Exit to restore focus
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ public class CompositeADTabbox extends AbstractADTabbox
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
onEditDetail(row, formView);
|
onEditDetail(row, formView);
|
||||||
adWindowPanel.onQuickForm();
|
adWindowPanel.onQuickForm(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,8 @@ public class WQuickForm extends Window implements IQuickForm
|
||||||
|
|
||||||
private int windowNo;
|
private int windowNo;
|
||||||
|
|
||||||
|
private boolean stayInParent;
|
||||||
|
|
||||||
public WQuickForm(AbstractADWindowContent winContent, boolean m_onlyCurrentRows, int m_onlyCurrentDays)
|
public WQuickForm(AbstractADWindowContent winContent, boolean m_onlyCurrentRows, int m_onlyCurrentDays)
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
|
|
@ -405,6 +407,10 @@ public class WQuickForm extends Window implements IQuickForm
|
||||||
adWinContent.setCurrQGV(null);
|
adWinContent.setCurrQGV(null);
|
||||||
}
|
}
|
||||||
adWinContent.getADTab().getSelectedTabpanel().query(onlyCurrentRows, onlyCurrentDays, MRole.getDefault().getMaxQueryRecords()); // autoSize
|
adWinContent.getADTab().getSelectedTabpanel().query(onlyCurrentRows, onlyCurrentDays, MRole.getDefault().getMaxQueryRecords()); // autoSize
|
||||||
|
|
||||||
|
if (stayInParent) {
|
||||||
|
adWinContent.onParentRecord();
|
||||||
|
}
|
||||||
} // dispose
|
} // dispose
|
||||||
|
|
||||||
private void createNewRow( )
|
private void createNewRow( )
|
||||||
|
|
@ -437,4 +443,13 @@ public class WQuickForm extends Window implements IQuickForm
|
||||||
int col = e.getChangedColumn();
|
int col = e.getChangedColumn();
|
||||||
quickGridView.dynamicDisplay(col);
|
quickGridView.dynamicDisplay(col);
|
||||||
} // dataStatusChanged
|
} // dataStatusChanged
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return to parent when closing the quick form
|
||||||
|
* @param stayInParent
|
||||||
|
*/
|
||||||
|
public void setStayInParent(boolean stayInParent) {
|
||||||
|
this.stayInParent = stayInParent;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue