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) if (!tableEditor)
getComponent().setCols(displayLength); getComponent().setCols(displayLength);
if (gridField.getDisplayType() == DisplayType.Text) if (tableEditor)
getComponent().setMultiline(false);
else if (gridField.getDisplayType() == DisplayType.Text)
{ {
getComponent().setMultiline(true); getComponent().setMultiline(true);
} }
@ -134,7 +136,7 @@ public class WStringEditor extends WEditor implements ContextMenuListener
} }
else else
getComponent().setMultiline(false); getComponent().setMultiline(false);
getComponent().setRows(gridField.getNumLines() <= 0 ? 1 : gridField.getNumLines()); getComponent().setRows(gridField.getNumLines() <= 0 || tableEditor ? 1 : gridField.getNumLines());
if (getComponent().getRows() > 1) if (getComponent().getRows() > 1)
getComponent().setHeight("100%"); 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.Event;
import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events; import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.Div;
import org.zkoss.zul.Label; import org.zkoss.zul.Label;
import org.zkoss.zul.Listbox; import org.zkoss.zul.Listbox;
import org.zkoss.zul.Listitem; import org.zkoss.zul.Listitem;
@ -280,13 +281,15 @@ public class WDocActionPanel extends Window implements EventListener<Event>, Dia
rows.appendChild(rowLabel); rows.appendChild(rowLabel);
rows.appendChild(rowSpacer); rows.appendChild(rowSpacer);
vlayout.appendChild(confirmPanel); Div footer = new Div();
LayoutUtils.addSclass("dialog-footer", confirmPanel); footer.setSclass("dialog-footer");
vlayout.appendChild(footer);
footer.appendChild(confirmPanel);
confirmPanel.setVflex("min");
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; margin: 0; padding: 0");
this.setZindex(1000); this.setZindex(1000);
} }

View File

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

View File

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

View File

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