IDEMPIERE-547 Zk: Shouldn't open embedded window as overlapped window. Fixed for document action dialog.
This commit is contained in:
parent
44d863d488
commit
79bc88e332
|
@ -25,6 +25,7 @@ import org.zkoss.zk.ui.util.Clients;
|
||||||
import org.zkoss.zul.Borderlayout;
|
import org.zkoss.zul.Borderlayout;
|
||||||
import org.zkoss.zul.Div;
|
import org.zkoss.zul.Div;
|
||||||
import org.zkoss.zul.Window;
|
import org.zkoss.zul.Window;
|
||||||
|
import org.zkoss.zul.Window.Mode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -148,6 +149,7 @@ public final class LayoutUtils {
|
||||||
.append(position)
|
.append(position)
|
||||||
.append("');");
|
.append("');");
|
||||||
window.setVisible(true);
|
window.setVisible(true);
|
||||||
|
window.setMode(Mode.EMBEDDED);
|
||||||
Clients.response("_openPopupWindow_", new AuScript(window, script.toString()));
|
Clients.response("_openPopupWindow_", new AuScript(window, script.toString()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -802,6 +802,8 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
|
|
||||||
private FindWindow findWindow;
|
private FindWindow findWindow;
|
||||||
|
|
||||||
|
private Div maskDiv;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see ToolbarListener#onLock()
|
* @see ToolbarListener#onLock()
|
||||||
*/
|
*/
|
||||||
|
@ -2376,10 +2378,9 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final int recordIdParam = record_ID;
|
final int recordIdParam = record_ID;
|
||||||
getComponent().getParent().appendChild(win);
|
|
||||||
win.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
|
win.addEventListener(DialogEvents.ON_WINDOW_CLOSE, new EventListener<Event>() {
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {
|
||||||
Clients.clearBusy(getComponent().getParent());
|
hideMaskDiv();
|
||||||
getComponent().invalidate();
|
getComponent().invalidate();
|
||||||
if (!win.isStartProcess()) {
|
if (!win.isStartProcess()) {
|
||||||
return;
|
return;
|
||||||
|
@ -2389,8 +2390,12 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
executeButtonProcess(wButton, startWOasking, table_ID, recordIdParam, isProcessMandatory);
|
executeButtonProcess(wButton, startWOasking, table_ID, recordIdParam, isProcessMandatory);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Clients.showBusy(getComponent().getParent(), " ");
|
getComponent().getParent().appendChild(getMaskDiv());
|
||||||
LayoutUtils.openOverlappedWindow(getComponent(), win, "middle_center");
|
getComponent().getParent().appendChild(win);
|
||||||
|
win.setContentStyle("background-color: #fff;");
|
||||||
|
LayoutUtils.openEmbeddedWindow(getComponent(), win, "middle_center");
|
||||||
|
win.setSclass("embedded-dialog");
|
||||||
|
win.focus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} // DocAction
|
} // DocAction
|
||||||
|
@ -2500,6 +2505,21 @@ public abstract class AbstractADWindowContent extends AbstractUIPart implements
|
||||||
isProcessMandatory);
|
isProcessMandatory);
|
||||||
} // actionButton
|
} // actionButton
|
||||||
|
|
||||||
|
private Div getMaskDiv() {
|
||||||
|
if (maskDiv == null) {
|
||||||
|
maskDiv = new Div();
|
||||||
|
maskDiv.setStyle("position: absolute; width: 100%; height: 100%; border: none; margin: 0; background-color: #e4e4e4; " +
|
||||||
|
"padding: 0; z-index:999; opacity:0.6; top: 0px; left: 0px;");
|
||||||
|
}
|
||||||
|
return maskDiv;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void hideMaskDiv() {
|
||||||
|
if (maskDiv != null && maskDiv.getParent() != null) {
|
||||||
|
maskDiv.detach();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void executeButtonProcess(final IProcessButton wButton,
|
private void executeButtonProcess(final IProcessButton wButton,
|
||||||
final boolean startWOasking, final int table_ID, final int record_ID,
|
final boolean startWOasking, final int table_ID, final int record_ID,
|
||||||
boolean isProcessMandatory) {
|
boolean isProcessMandatory) {
|
||||||
|
|
|
@ -273,6 +273,8 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
|
||||||
this.setTitle(Msg.translate(Env.getCtx(), "DocAction"));
|
this.setTitle(Msg.translate(Env.getCtx(), "DocAction"));
|
||||||
this.setWidth("410px");
|
this.setWidth("410px");
|
||||||
this.setBorder("normal");
|
this.setBorder("normal");
|
||||||
|
this.setStyle("position: absolute");
|
||||||
|
this.setZindex(1000);
|
||||||
this.appendChild(grid);
|
this.appendChild(grid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1024,3 +1024,12 @@ tbody.z-grid-empty-body td {
|
||||||
border-bottom: 1px solid #CFCFCF !important;
|
border-bottom: 1px solid #CFCFCF !important;
|
||||||
border-top: 1px solid #CFCFCF !important;
|
border-top: 1px solid #CFCFCF !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.embedded-dialog {
|
||||||
|
background-color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.embedded-dialog .z-window-embedded-header {
|
||||||
|
color: #fff;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue