IDEMPIERE-1635 Upgrade to zk7. More window and dialog layout fix.

Fixed long text overflow for grid cell. Fixed multi line editor for grid cell.
This commit is contained in:
Heng Sin Low 2013-12-20 11:34:15 +08:00
parent f2fffd22bf
commit 3187afe05c
5 changed files with 44 additions and 9 deletions

View File

@ -120,7 +120,9 @@ public class WStringEditor extends WEditor implements ContextMenuListener
}
if (!tableEditor)
getComponent().setCols(displayLength);
if (gridField.getDisplayType() == DisplayType.Text)
if (tableEditor)
getComponent().setMultiline(false);
else if (gridField.getDisplayType() == DisplayType.Text)
{
getComponent().setMultiline(true);
}
@ -134,7 +136,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener
}
else
getComponent().setMultiline(false);
getComponent().setRows(gridField.getNumLines() <= 0 ? 1 : gridField.getNumLines());
getComponent().setRows(gridField.getNumLines() <= 0 || tableEditor ? 1 : gridField.getNumLines());
if (getComponent().getRows() > 1)
getComponent().setHeight("100%");

View File

@ -48,6 +48,7 @@ import org.compiere.wf.MWFActivity;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
import org.zkoss.zul.Label;
import org.zkoss.zul.Listbox;
import org.zkoss.zul.Listitem;
@ -280,13 +281,15 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
rows.appendChild(rowLabel);
rows.appendChild(rowSpacer);
vlayout.appendChild(confirmPanel);
LayoutUtils.addSclass("dialog-footer", confirmPanel);
Div footer = new Div();
footer.setSclass("dialog-footer");
vlayout.appendChild(footer);
footer.appendChild(confirmPanel);
confirmPanel.setVflex("min");
this.setTitle(Msg.translate(Env.getCtx(), "DocAction"));
this.setWidth("410px");
this.setBorder("normal");
this.setStyle("position: absolute; margin: 0; padding: 0");
this.setZindex(1000);
}

View File

@ -98,6 +98,7 @@ public class WRecordInfo extends Window implements EventListener<Event>
this.setSizable(true);
this.setClosable(true);
this.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "recordInfo");
this.setSclass("popup-dialog");
try
{
@ -180,6 +181,7 @@ public class WRecordInfo extends Window implements EventListener<Event>
}
//
South south = new South();
south.setSclass("dialog-footer");
south.setParent(layout);
south.appendChild(confirmPanel);

View File

@ -76,11 +76,13 @@ public class WTextEditorDialog extends Window implements EventListener<Event>{
setWidth("800px");
setStyle("position: absolute;");
setSizable(false);
setSclass("popup-dialog");
Vlayout vbox = new Vlayout();
appendChild(vbox);
vbox.setWidth("100%");
vbox.setVflex("true");
vbox.setSclass("dialog-content");
tabbox = new Tabbox();
vbox.appendChild(tabbox);
@ -125,14 +127,17 @@ public class WTextEditorDialog extends Window implements EventListener<Event>{
vbox.appendChild(new Separator());
Div footer = new Div();
footer.setSclass("dialog-footer");
ConfirmPanel confirmPanel = new ConfirmPanel(true);
vbox.appendChild(confirmPanel);
footer.appendChild(confirmPanel);
confirmPanel.addButton(confirmPanel.createButton(ConfirmPanel.A_RESET));
confirmPanel.addActionListener(this);
appendChild(footer);
if (maxSize > 0) {
status = new Label();
appendChild(status);
footer.appendChild(status);
updateStatus(text.length());
status.setStyle("margin-top:10px;");

View File

@ -1350,8 +1350,12 @@ tbody.z-grid-empty-body td {
border-left: 1px solid #c5c5c5;
border-right: 1px solid #c5c5c5;
}
.toolbar-popup-window .z-window-content {
padding: 0px;
}
.toolbar-popup-window.z-window.z-window-noheader {
padding: 4px;
padding-bottom: 0px;
}
.toolbar-popup-window.process-buttons-popup .z-button {
@ -1361,7 +1365,8 @@ tbody.z-grid-empty-body td {
margin: auto;
}
.toolbar-popup-window-cnt {
.toolbar-popup-window.process-buttons-popup .toolbar-popup-window-cnt {
padding: 8px;
}
.toolbar-popup-window::before {
@ -1386,6 +1391,10 @@ tbody.z-grid-empty-body td {
top: -6px;
}
.toolbar-popup-window .dialog-footer {
padding: 4px;
}
.adwindow-detailpane-sub-tab::before {
content: '';
position: absolute;
@ -1466,6 +1475,10 @@ span.grid-combobox-editor {
background-color: #484848;
border-color: #484848;
}
.z-window-embedded > .z-window-header {
border-radius: 0px;
background-color: transparent;
}
.z-window-overlapped, .z-window-popup, .z-window-modal, .z-window-highlighted,
.embedded-dialog .z-window-embedded
@ -1607,10 +1620,12 @@ font-size: 0;
}
.popup-dialog > .z-window-content, .info-panel > .z-window-content {
padding: 0px;
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
}
.popup-dialog .dialog-content {
padding: 8px !important;
margin-bottom: 20px !important;
--margin-bottom: 20px !important;
}
.popup-dialog.z-window-overlapped .dialog-footer {
@ -1920,3 +1935,11 @@ table.z-vbox > tbody > tr > td > table {
.dashboard-widget.dashboard-widget-max .chart-gadget {
height: 100% !important;
}
<%-- text overflow for grid cell --%>
.z-cell > span.z-label {
overflow: hidden;
text-overflow: ellipsis;
display: inline-block;
width: 100%;
}