IDEMPIERE-4739 Fix Height of HTML Text Editor not responsive (#1350)
This commit is contained in:
parent
4e1515f52a
commit
da83283d74
|
@ -84,6 +84,7 @@ import org.zkoss.zul.Borderlayout;
|
|||
import org.zkoss.zul.Cell;
|
||||
import org.zkoss.zul.Center;
|
||||
import org.zkoss.zul.Div;
|
||||
import org.zkoss.zul.North;
|
||||
import org.zkoss.zul.South;
|
||||
|
||||
/**
|
||||
|
@ -204,6 +205,8 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
|
|||
setAttachment(attachment);
|
||||
setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
|
||||
addEventListener(Events.ON_CANCEL, e -> onCancel());
|
||||
addEventListener(Events.ON_SIZE, e -> onSize());
|
||||
addEventListener(Events.ON_MAXIMIZE, e -> onSize());
|
||||
} // commonInit
|
||||
|
||||
|
||||
|
@ -373,11 +376,8 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
|
|||
attachmentBox.appendChild(item);
|
||||
}
|
||||
|
||||
row = new Row();
|
||||
rows.appendChild(row);
|
||||
row.appendCellChild(fMessage, 2);
|
||||
fMessage.setHflex("2");
|
||||
fMessage.setHeight("350px");
|
||||
fMessage.setWidth("100%");
|
||||
fMessage.setHeight("100%");
|
||||
|
||||
confirmPanel.addActionListener(this);
|
||||
|
||||
|
@ -409,11 +409,16 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
|
|||
this.appendChild(borderlayout);
|
||||
ZKUpdateUtil.setWidth(borderlayout, "100%");
|
||||
|
||||
North northPane = new North();
|
||||
northPane.setSclass("dialog-content");
|
||||
northPane.setAutoscroll(true);
|
||||
borderlayout.appendChild(northPane);
|
||||
northPane.appendChild(grid);
|
||||
|
||||
Center centerPane = new Center();
|
||||
centerPane.setSclass("dialog-content");
|
||||
centerPane.setAutoscroll(true);
|
||||
borderlayout.appendChild(centerPane);
|
||||
centerPane.appendChild(grid);
|
||||
centerPane.appendChild(fMessage);
|
||||
|
||||
South southPane = new South();
|
||||
southPane.setSclass("dialog-footer");
|
||||
|
@ -622,6 +627,10 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
|
|||
private void onCancel() {
|
||||
onClose();
|
||||
}
|
||||
|
||||
private void onSize() {
|
||||
fMessage.invalidate();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param dataSource
|
||||
|
|
|
@ -186,6 +186,8 @@ public class WTextEditorDialog extends Window implements EventListener<Event>{
|
|||
setSizable(true);
|
||||
setMaximizable(true);
|
||||
addEventListener(Events.ON_CANCEL, e -> onCancel());
|
||||
addEventListener(Events.ON_SIZE, e -> onSize());
|
||||
addEventListener(Events.ON_MAXIMIZE, e -> onSize());
|
||||
}
|
||||
|
||||
private void createEditor(org.zkoss.zul.Tabpanel tabPanel) {
|
||||
|
@ -255,6 +257,10 @@ public class WTextEditorDialog extends Window implements EventListener<Event>{
|
|||
detach();
|
||||
}
|
||||
|
||||
private void onSize() {
|
||||
editor.invalidate();
|
||||
}
|
||||
|
||||
private void updateStatus(int newLength) {
|
||||
if (status != null && maxSize > 0) {
|
||||
StringBuilder msg = new StringBuilder();
|
||||
|
|
Loading…
Reference in New Issue