Merge release-2.0
This commit is contained in:
commit
b4ca6bc1b7
|
@ -1410,7 +1410,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void focus() {
|
public void focus() {
|
||||||
if (formContainer.isVisible())
|
if (form.isVisible())
|
||||||
this.focusToFirstEditor(true);
|
this.focusToFirstEditor(true);
|
||||||
else
|
else
|
||||||
listPanel.focus();
|
listPanel.focus();
|
||||||
|
|
|
@ -730,7 +730,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
|
||||||
setFocusToField(columnOnClick);
|
setFocusToField(columnOnClick);
|
||||||
columnOnClick = null;
|
columnOnClick = null;
|
||||||
} else {
|
} else {
|
||||||
renderer.focusToFirstEditor();
|
focusToFirstEditorIfNotDetailTab();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
focusToRow(row);
|
focusToRow(row);
|
||||||
|
@ -761,6 +761,30 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void focusToFirstEditorIfNotDetailTab() {
|
||||||
|
ADTabpanel adtabpanel = null;
|
||||||
|
boolean setFocus = true;
|
||||||
|
Component parent = listbox.getParent();
|
||||||
|
while (parent != null) {
|
||||||
|
if (parent instanceof ADTabpanel) {
|
||||||
|
adtabpanel = (ADTabpanel) parent;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
parent = parent.getParent();
|
||||||
|
}
|
||||||
|
if (adtabpanel != null)
|
||||||
|
{
|
||||||
|
ADWindow adwindow = ADWindow.findADWindow(adtabpanel);
|
||||||
|
if (adwindow != null) {
|
||||||
|
IADTabpanel selectedADTabpanel = adwindow.getADWindowContent().getADTab().getSelectedTabpanel();
|
||||||
|
if (selectedADTabpanel != adtabpanel)
|
||||||
|
setFocus = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (setFocus)
|
||||||
|
renderer.focusToFirstEditor();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* scroll grid to the current focus row
|
* scroll grid to the current focus row
|
||||||
*/
|
*/
|
||||||
|
@ -774,7 +798,7 @@ public class GridView extends Vbox implements EventListener<Event>, IdSpace, IFi
|
||||||
setFocusToField(columnOnClick);
|
setFocusToField(columnOnClick);
|
||||||
columnOnClick = null;
|
columnOnClick = null;
|
||||||
} else {
|
} else {
|
||||||
renderer.focusToFirstEditor();
|
focusToFirstEditorIfNotDetailTab();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Component cmp = null;
|
Component cmp = null;
|
||||||
|
|
|
@ -311,7 +311,9 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
|
||||||
{
|
{
|
||||||
String selected = lstDocAction.getSelectedItem().getValue().toString();
|
String selected = lstDocAction.getSelectedItem().getValue().toString();
|
||||||
if((selected.equals(org.compiere.process.DocAction.ACTION_Close) && clientInfo.isConfirmOnDocClose())
|
if((selected.equals(org.compiere.process.DocAction.ACTION_Close) && clientInfo.isConfirmOnDocClose())
|
||||||
|| (selected.equals(org.compiere.process.DocAction.ACTION_Void) && clientInfo.isConfirmOnDocVoid()))
|
|| (selected.equals(org.compiere.process.DocAction.ACTION_Void) && clientInfo.isConfirmOnDocVoid())
|
||||||
|
|| (selected.equals(org.compiere.process.DocAction.ACTION_Reverse_Accrual) && clientInfo.isConfirmOnDocVoid())
|
||||||
|
|| (selected.equals(org.compiere.process.DocAction.ACTION_Reverse_Correct) && clientInfo.isConfirmOnDocVoid()))
|
||||||
{
|
{
|
||||||
String docAction = lstDocAction.getSelectedItem().getLabel();
|
String docAction = lstDocAction.getSelectedItem().getLabel();
|
||||||
MessageFormat mf = new MessageFormat(Msg.getMsg(Env.getAD_Language(Env.getCtx()), "ConfirmOnDocAction"));
|
MessageFormat mf = new MessageFormat(Msg.getMsg(Env.getAD_Language(Env.getCtx()), "ConfirmOnDocAction"));
|
||||||
|
|
Loading…
Reference in New Issue