IDEMPIERE-1076 LocationDialog opened from QuickEntry : Select city from the list close the panel / based on patch from Carlos Sanchez
This commit is contained in:
parent
339d10e787
commit
ddec3a2a70
|
@ -27,9 +27,11 @@ import java.sql.SQLException;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
import org.adempiere.util.Callback;
|
import org.adempiere.util.Callback;
|
||||||
|
import org.adempiere.webui.LayoutUtils;
|
||||||
import org.adempiere.webui.ValuePreference;
|
import org.adempiere.webui.ValuePreference;
|
||||||
import org.adempiere.webui.adwindow.ADTabpanel;
|
import org.adempiere.webui.adwindow.ADTabpanel;
|
||||||
import org.adempiere.webui.adwindow.ADWindow;
|
import org.adempiere.webui.adwindow.ADWindow;
|
||||||
|
import org.adempiere.webui.adwindow.ADWindowContent;
|
||||||
import org.adempiere.webui.adwindow.IFieldEditorContainer;
|
import org.adempiere.webui.adwindow.IFieldEditorContainer;
|
||||||
import org.adempiere.webui.apps.AEnv;
|
import org.adempiere.webui.apps.AEnv;
|
||||||
import org.adempiere.webui.component.Searchbox;
|
import org.adempiere.webui.component.Searchbox;
|
||||||
|
@ -90,6 +92,8 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
|
|
||||||
private static final String IN_PROGRESS_IMAGE = "~./zk/img/progress3.gif";
|
private static final String IN_PROGRESS_IMAGE = "~./zk/img/progress3.gif";
|
||||||
|
|
||||||
|
private ADWindow adwindow;
|
||||||
|
|
||||||
public WSearchEditor (GridField gridField)
|
public WSearchEditor (GridField gridField)
|
||||||
{
|
{
|
||||||
super(new CustomSearchBox(), gridField);
|
super(new CustomSearchBox(), gridField);
|
||||||
|
@ -504,6 +508,11 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
vqe.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
|
vqe.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
|
if (adwindow != null)
|
||||||
|
{
|
||||||
|
adwindow.getADWindowContent().hideBusyMask();
|
||||||
|
adwindow = null;
|
||||||
|
}
|
||||||
// get result
|
// get result
|
||||||
int result = vqe.getRecord_ID();
|
int result = vqe.getRecord_ID();
|
||||||
|
|
||||||
|
@ -520,8 +529,16 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
vqe.setVisible(true);
|
vqe.setSizable(true);
|
||||||
AEnv.showWindow(vqe);
|
adwindow = ADWindow.findADWindow(getComponent());
|
||||||
|
if (adwindow != null) {
|
||||||
|
ADWindowContent content = adwindow.getADWindowContent();
|
||||||
|
content.getComponent().getParent().appendChild(vqe);
|
||||||
|
content.showBusyMask(vqe);
|
||||||
|
LayoutUtils.openOverlappedWindow(content.getComponent().getParent(), vqe, "middle_center");
|
||||||
|
} else {
|
||||||
|
AEnv.showWindow(vqe);
|
||||||
|
}
|
||||||
} // actionQuickEntry
|
} // actionQuickEntry
|
||||||
|
|
||||||
private void actionButton(String queryValue)
|
private void actionButton(String queryValue)
|
||||||
|
|
Loading…
Reference in New Issue