IDEMPIERE-724 Zk: Make iDempiere theme more easily customizable - Added css class to popup windows

This commit is contained in:
Elaine Tan 2013-06-07 19:45:04 +08:00
parent c0895ae0fc
commit 39ca003c65
11 changed files with 264 additions and 214 deletions

View File

@ -68,26 +68,28 @@ public class WPaymentFormWindow extends Window implements EventListener<Event>,
}
this.setTitle(Msg.getMsg(Env.getCtx(), "Payment"));
this.setHeight("400px");
this.setWidth("500px");
this.setSclass("popup-dialog");
this.setBorder("normal");
this.setWidth("500px");
this.setShadow(true);
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
}
private void zkInit() throws Exception {
this.appendChild(mainPanel);
mainPanel.appendChild(mainLayout);
mainPanel.setStyle("width: 100%; height: 100%; padding: 0; margin: 0");
mainLayout.setHeight("100%");
mainLayout.setWidth("100%");
Center center = new Center();
center.setSclass("dialog-content");
mainLayout.appendChild(center);
mainLayout.setHflex("1");
mainLayout.setVflex("min");
center.appendChild(centerPanel = getPanel());
centerPanel.setHflex("1");
centerPanel.setVflex("1");
centerPanel.setHflex("1");
center.setAutoscroll(true);
//
South south = new South();
south.setStyle("border: none");
south.setSclass("dialog-footer");
mainLayout.appendChild(south);
south.appendChild(confirmPanel);
confirmPanel.addActionListener(this);

View File

@ -218,12 +218,13 @@ public class WAttachment extends Window implements EventListener<Event>
this.setAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "attachment");
this.setMaximizable(true);
this.setWidth("700px");
this.setHeight("88%");
this.setHeight("85%");
this.setTitle("Attachment");
this.setClosable(true);
this.setSizable(true);
this.setBorder("normal");
this.setSclass("popup-dialog");
this.setShadow(true);
this.appendChild(mainPanel);
mainPanel.setHeight("100%");
mainPanel.setWidth("100%");
@ -248,6 +249,8 @@ public class WAttachment extends Window implements EventListener<Event>
div.appendChild(toolBar);
text.setRows(3);
text.setHflex("1");
text.setHeight("100%");
div.appendChild(text);
northPanel.appendChild(div);

View File

@ -122,6 +122,8 @@ public class ExportAction implements EventListener<Event>
vb.appendChild(vlayout);
Hbox hb = new Hbox();
hb.setAlign("center");
hb.setPack("start");
Div div = new Div();
div.setStyle("text-align: right;");
div.appendChild(new Label(Msg.getMsg(Env.getCtx(), "FilesOfType")));
@ -131,6 +133,8 @@ public class ExportAction implements EventListener<Event>
vlayout.appendChild(hb);
hb = new Hbox();
hb.setAlign("center");
hb.setPack("start");
chkCurrentRow.setLabel(Msg.getMsg(Env.getCtx(), "ExportCurrentRowOnly"));
chkCurrentRow.setSelected(true);
hb.appendChild(chkCurrentRow);

View File

@ -158,6 +158,8 @@ public class FileImportAction implements EventListener<Event>
vb.appendChild(vlayout);
Hbox hb = new Hbox();
hb.setAlign("center");
hb.setPack("start");
Div div = new Div();
div.setStyle("text-align: right;");
div.appendChild(new Label(Msg.getMsg(Env.getCtx(), "FilesOfType")));
@ -167,6 +169,8 @@ public class FileImportAction implements EventListener<Event>
vlayout.appendChild(hb);
hb = new Hbox();
hb.setAlign("center");
hb.setPack("start");
Div div2 = new Div();
div2.setStyle("text-align: right;");
div2.appendChild(new Label(Msg.getMsg(Env.getCtx(), "Charset", false)));
@ -179,6 +183,8 @@ public class FileImportAction implements EventListener<Event>
vlayout.appendChild(hb);
hb = new Hbox();
hb.setAlign("center");
hb.setPack("start");
Div div3 = new Div();
div3.setStyle("text-align: right;");
div3.appendChild(new Label(Msg.getMsg(Env.getCtx(), "import.mode", true)));
@ -191,9 +197,12 @@ public class FileImportAction implements EventListener<Event>
vlayout.appendChild(hb);
hb = new Hbox();
hb.setAlign("center");
hb.setPack("start");
bFile.setLabel(Msg.getMsg(Env.getCtx(), "FileImportFile"));
bFile.setTooltiptext(Msg.getMsg(Env.getCtx(), "FileImportFileInfo"));
bFile.setUpload(AdempiereWebUI.getUploadSetting());
LayoutUtils.addSclass("txt-btn", bFile);
bFile.addEventListener(Events.ON_UPLOAD, this);
hb.appendChild(bFile);
vlayout.appendChild(hb);

View File

@ -145,6 +145,7 @@ public class ReportAction implements EventListener<Event>
Hbox hb = new Hbox();
hb.setAlign("center");
hb.setPack("start");
Div div = new Div();
div.appendChild(new Label(Msg.translate(Env.getCtx(), "AD_PrintFormat_ID")));
hb.appendChild(div);
@ -155,12 +156,11 @@ public class ReportAction implements EventListener<Event>
vb.appendChild(chkCurrentRowOnly);
if ( isCanExport )
{
hb = new Hbox();
hb.setAlign("center");
hb.setPack("start");
hb.appendChild(chkExport);
chkExport.addEventListener(Events.ON_CHECK, this);
hb.appendChild(cboExportType);
@ -168,12 +168,10 @@ public class ReportAction implements EventListener<Event>
vb.appendChild(hb);
}
vb.appendChild(chkAllColumns);
vb.appendChild(confirmPanel);
LayoutUtils.addSclass("dialog-footer", confirmPanel);
confirmPanel.addActionListener(this);
}

View File

@ -18,6 +18,7 @@ import java.io.FileNotFoundException;
import java.util.Vector;
import java.util.logging.Level;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Checkbox;
@ -55,12 +56,15 @@ import org.zkoss.zhtml.Textarea;
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.Borderlayout;
import org.zkoss.zul.Center;
import org.zkoss.zul.Div;
import org.zkoss.zul.Filedownload;
import org.zkoss.zul.Hbox;
import org.zkoss.zul.Image;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.Separator;
import org.zkoss.zul.South;
import org.zkoss.zul.Space;
import org.zkoss.zul.Vbox;
@ -100,18 +104,12 @@ public class AboutWindow extends Window implements EventListener<Event> {
this.setPosition("center");
this.setTitle(ThemeManager.getBrowserTitle());
this.setSclass("popup-dialog");
this.setClosable(true);
this.setMaximizable(true);
this.setSizable(true);
Vbox layout = new Vbox();
layout.setWidth("100%");
layout.setParent(this);
layout.setVflex("1");
layout.setHflex("1");
tabbox = new Tabbox();
tabbox.setParent(layout);
tabbox.setVflex("1");
tabbox.setHflex("1");
Tabs tabs = new Tabs();
@ -150,18 +148,31 @@ public class AboutWindow extends Window implements EventListener<Event> {
tabPanel = createTrace();
tabPanel.setParent(tabPanels);
Hbox hbox = new Hbox();
hbox.setParent(layout);
hbox.setPack("end");
hbox.setWidth("100%");
hbox.setVflex("min");
Button btnOk = ButtonFactory.createNamedButton(ConfirmPanel.A_OK);
btnOk.addEventListener(Events.ON_CLICK, this);
btnOk.setParent(hbox);
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
borderlayout.setHflex("1");
borderlayout.setVflex("1");
Center centerPane = new Center();
centerPane.setSclass("dialog-content");
centerPane.setAutoscroll(true);
borderlayout.appendChild(centerPane);
centerPane.appendChild(tabbox);
South southPane = new South();
southPane.setStyle("text-align: right");
southPane.setSclass("dialog-footer");
borderlayout.appendChild(southPane);
southPane.appendChild(btnOk);
this.setBorder("normal");
this.setWidth("500px");
this.setWidth("600px");
this.setHeight("450px");
this.setShadow(true);
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
}
private Tabpanel createTrace() {
@ -206,6 +217,7 @@ public class AboutWindow extends Window implements EventListener<Event> {
levelLabel.setTooltiptext("Set trace level. Warning: this will effect all session not just the current session");
btnAdempiereLog = new Button("iDempiere Log");
btnAdempiereLog.setTooltiptext("Download iDempiere log file from server");
LayoutUtils.addSclass("txt-btn", btnAdempiereLog);
btnAdempiereLog.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(new Space());
@ -219,6 +231,8 @@ public class AboutWindow extends Window implements EventListener<Event> {
vbox.appendChild(hbox);
hbox = new Hbox();
hbox.setAlign("center");
hbox.setPack("start");
bErrorsOnly = new Checkbox();
bErrorsOnly.setLabel(Msg.getMsg(Env.getCtx(), "ErrorsOnly"));
//default only show error
@ -228,16 +242,17 @@ public class AboutWindow extends Window implements EventListener<Event> {
hbox.appendChild(new Space());
btnDownload = new Button(Msg.getMsg(Env.getCtx(), "SaveFile"));
btnDownload .setTooltiptext("Download session log");
LayoutUtils.addSclass("txt-btn", btnDownload);
btnDownload.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnDownload);
hbox.appendChild(new Space());
btnErrorEmail = new Button(Msg.getMsg(Env.getCtx(), "SendEMail"));
btnErrorEmail.setTooltiptext("Email session log");
LayoutUtils.addSclass("txt-btn", btnErrorEmail);
btnErrorEmail.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnErrorEmail);
hbox.appendChild(new Space());
btnViewLog = new Button(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "View")));
btnViewLog.setTooltiptext("View session log");
LayoutUtils.addSclass("txt-btn", btnViewLog);
btnViewLog.addEventListener(Events.ON_CLICK, this);
hbox.appendChild(btnViewLog);
hbox.setHflex("1");

View File

@ -63,9 +63,12 @@ import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zk.ui.event.UploadEvent;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Cell;
import org.zkoss.zul.Center;
import org.zkoss.zul.Div;
import org.zkoss.zul.Vlayout;
import org.zkoss.zul.South;
import org.zkoss.zul.Space;
/**
* EMail Dialog
@ -102,12 +105,12 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
{
super();
this.setTitle(title);
this.setWidth("550px");
this.setHeight("600px");
this.setSclass("popup-dialog");
this.setClosable(true);
this.setMaximizable(true);
this.setBorder("normal");
this.setStyle("position:absolute; margin: 0; padding: 0;");
this.setWidth("550px");
this.setShadow(true);
this.setMaximizable(true);
commonInit(from, to, subject, message, attachment);
} // EmailDialog
@ -298,20 +301,14 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
row = new Row();
rows.appendChild(row);
row.appendCellChild(fMessage, 2);
row.appendChild(new Space());
row.appendChild(fMessage);
fMessage.setHflex("1");
fMessage.setHeight("100%");
fMessage.setRows(10);
confirmPanel.addActionListener(this);
Vlayout vlayout = new Vlayout();
vlayout.setStyle("width: 99%; margin: auto; height: 100%;");
grid.setVflex("1");
vlayout.appendChild(grid);
Div southDiv = new Div();
Button btn = new Button();
btn.setImage(ThemeManager.getThemeResource("images/Attachment24.png"));
btn.setUpload(AdempiereWebUI.getUploadSetting());
@ -320,11 +317,23 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
confirmPanel.addComponentsLeft(btn);
confirmPanel.getButton(ConfirmPanel.A_OK).setWidgetListener("onClick", "zAu.cmd0.showBusy(null)");
southDiv.appendChild(confirmPanel);
southDiv.setVflex("min");
vlayout.appendChild(southDiv);
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
borderlayout.setHflex("1");
borderlayout.setVflex("min");
this.appendChild(vlayout);
Center centerPane = new Center();
centerPane.setSclass("dialog-content");
centerPane.setAutoscroll(true);
borderlayout.appendChild(centerPane);
centerPane.appendChild(grid);
grid.setVflex("1");
grid.setHflex("1");
South southPane = new South();
southPane.setSclass("dialog-footer");
borderlayout.appendChild(southPane);
southPane.appendChild(confirmPanel);
} // render
/**

View File

@ -20,6 +20,7 @@ import java.io.InputStream;
import java.util.logging.Level;
import org.adempiere.webui.AdempiereWebUI;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.ConfirmPanel;
@ -114,21 +115,24 @@ public class WImageDialog extends Window implements EventListener<Event>
*/
void init() throws Exception
{
this.setSclass("popup-dialog");
this.setBorder("normal");
this.setWidth("450px");
this.setHeight("550px");
this.setShadow(true);
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
this.setSizable(true);
mainLayout.setParent(this);
mainLayout.setWidth("100%");
mainLayout.setHeight("100%");
mainLayout.setStyle("background-color: transparent");
mainLayout.setHflex("1");
mainLayout.setVflex("1");
fileLabel.setValue(Msg.getMsg(Env.getCtx(), "SelectFile"));
fileButton.setLabel("-");
LayoutUtils.addSclass("txt-btn", fileButton);
North north = new North();
north.setParent(mainLayout);
north.setStyle("background-color: transparent");
north.appendChild(parameterPanel);
parameterPanel.appendChild(fileLabel);
@ -136,14 +140,14 @@ public class WImageDialog extends Window implements EventListener<Event>
parameterPanel.appendChild((fileButton));
Center center = new Center();
center.setSclass("dialog-content");
image.setHflex("true");
image.setVflex("true");
center.setParent(mainLayout);
center.appendChild(image);
center.setStyle("background-color: transparent");
South south = new South();
south.setStyle("background-color: transparent; border: none;");
south.setSclass("dialog-footer");
south.setParent(mainLayout);
south.appendChild(confirmPanel);

View File

@ -26,7 +26,11 @@ import java.util.List;
import java.util.StringTokenizer;
import java.util.logging.Level;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Column;
import org.adempiere.webui.component.Columns;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory;
import org.adempiere.webui.component.Label;
@ -36,7 +40,6 @@ import org.adempiere.webui.component.Panel;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.theme.ThemeManager;
import org.compiere.model.GridField;
import org.compiere.model.MBPartnerLocation;
import org.compiere.model.MCountry;
@ -52,6 +55,10 @@ import org.zkoss.zk.ui.Executions;
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.Borderlayout;
import org.zkoss.zul.Center;
import org.zkoss.zul.South;
import org.zkoss.zul.Vbox;
/**
* @author Sendy Yagambrum
@ -100,8 +107,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
private Listbox lstRegion;
private Listbox lstCountry;
private Button btnOk;
private Button btnCancel;
private ConfirmPanel confirmPanel;
private Grid mainPanel;
private boolean m_change = false;
@ -181,7 +187,8 @@ public class WLocationDialog extends Window implements EventListener<Event>
setRegion();
initLocation();
//
this.setWidth("380px");
this.setWidth("350px");
this.setSclass("popup-dialog");
this.setClosable(true);
this.setBorder("normal");
this.setShadow(true);
@ -243,59 +250,76 @@ public class WLocationDialog extends Window implements EventListener<Event>
lstCountry.setWidth("154px");
lstCountry.setRows(0);
btnOk = new Button();
btnOk.setImage(ThemeManager.getThemeResource("images/Ok16.png"));
btnOk.addEventListener(Events.ON_CLICK,this);
btnCancel = new Button();
btnCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
btnCancel.addEventListener(Events.ON_CLICK,this);
confirmPanel = new ConfirmPanel(true);
confirmPanel.addActionListener(this);
toLink = new Button(TO_LINK);
LayoutUtils.addSclass("txt-btn", toLink);
toLink.addEventListener(Events.ON_CLICK,this);
toRoute = new Button(TO_ROUTE);
LayoutUtils.addSclass("txt-btn", toRoute);
toRoute.addEventListener(Events.ON_CLICK,this);
mainPanel = GridFactory.newGridLayout();
mainPanel.setStyle("padding:5px");
}
private void init()
{
Columns columns = new Columns();
mainPanel.appendChild(columns);
Column column = new Column();
columns.appendChild(column);
column.setWidth("30%");
column = new Column();
columns.appendChild(column);
column.setWidth("70%");
Row pnlAddress1 = new Row();
pnlAddress1.appendChild(lblAddress1.rightAlign());
pnlAddress1.appendChild(txtAddress1);
txtAddress1.setHflex("1");
Row pnlAddress2 = new Row();
pnlAddress2.appendChild(lblAddress2.rightAlign());
pnlAddress2.appendChild(txtAddress2);
txtAddress2.setHflex("1");
Row pnlAddress3 = new Row();
pnlAddress3.appendChild(lblAddress3.rightAlign());
pnlAddress3.appendChild(txtAddress3);
txtAddress3.setHflex("1");
Row pnlAddress4 = new Row();
pnlAddress4.appendChild(lblAddress4.rightAlign());
pnlAddress4.appendChild(txtAddress4);
txtAddress4.setHflex("1");
Row pnlCity = new Row();
pnlCity.appendChild(lblCity.rightAlign());
pnlCity.appendChild(txtCity);
txtCity.setHflex("1");
Row pnlPostal = new Row();
pnlPostal.appendChild(lblPostal.rightAlign());
pnlPostal.appendChild(txtPostal);
txtPostal.setHflex("1");
Row pnlPostalAdd = new Row();
pnlPostalAdd.appendChild(lblPostalAdd.rightAlign());
pnlPostalAdd.appendChild(txtPostalAdd);
txtPostalAdd.setHflex("1");
Row pnlRegion = new Row();
pnlRegion.appendChild(lblRegion.rightAlign());
pnlRegion.appendChild(lstRegion);
lstRegion.setHflex("1");
Row pnlCountry = new Row();
pnlCountry.appendChild(lblCountry.rightAlign());
pnlCountry.appendChild(lstCountry);
lstCountry.setHflex("1");
Panel pnlLinks = new Panel();
pnlLinks.appendChild(toLink);
@ -305,18 +329,30 @@ public class WLocationDialog extends Window implements EventListener<Event>
if (MLocation.LOCATION_MAPS_ROUTE_PREFIX == null || Env.getAD_Org_ID(Env.getCtx()) <= 0)
toRoute.setVisible(false);
pnlLinks.setWidth("100%");
pnlLinks.setStyle("text-align:left");
pnlLinks.setStyle("text-align:right");
Panel pnlButton = new Panel();
pnlButton.appendChild(btnOk);
pnlButton.appendChild(btnCancel);
pnlButton.setWidth("100%");
pnlButton.setStyle("text-align:right");
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
borderlayout.setHflex("1");
borderlayout.setVflex("min");
this.appendChild(mainPanel);
Center centerPane = new Center();
centerPane.setSclass("dialog-content");
centerPane.setAutoscroll(true);
borderlayout.appendChild(centerPane);
Vbox vbox = new Vbox();
centerPane.appendChild(vbox);
vbox.appendChild(mainPanel);
if (MLocation.LOCATION_MAPS_URL_PREFIX != null || MLocation.LOCATION_MAPS_ROUTE_PREFIX != null)
this.appendChild(pnlLinks);
this.appendChild(pnlButton);
vbox.appendChild(pnlLinks);
vbox.setVflex("1");
vbox.setHflex("1");
South southPane = new South();
southPane.setSclass("dialog-footer");
borderlayout.appendChild(southPane);
southPane.appendChild(confirmPanel);
}
/**
* Dynamically add fields to the Location dialog box
@ -504,7 +540,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
public void onEvent(Event event) throws Exception
{
if (btnOk.equals(event.getTarget()))
if (event.getTarget() == confirmPanel.getButton(ConfirmPanel.A_OK))
{
inOKAction = true;
@ -534,7 +570,7 @@ public class WLocationDialog extends Window implements EventListener<Event>
}
inOKAction = false;
}
else if (btnCancel.equals(event.getTarget()))
else if (event.getTarget() == confirmPanel.getButton(ConfirmPanel.A_CANCEL))
{
m_change = false;
this.dispose();

View File

@ -27,14 +27,19 @@ import java.sql.SQLException;
import java.util.logging.Level;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Button;
import org.adempiere.webui.component.Checkbox;
import org.adempiere.webui.component.Column;
import org.adempiere.webui.component.Columns;
import org.adempiere.webui.component.ConfirmPanel;
import org.adempiere.webui.component.Grid;
import org.adempiere.webui.component.GridFactory;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.ListItem;
import org.adempiere.webui.component.Listbox;
import org.adempiere.webui.component.Row;
import org.adempiere.webui.component.Rows;
import org.adempiere.webui.component.Textbox;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.theme.ThemeManager;
import org.compiere.model.MLocator;
import org.compiere.model.MLocatorLookup;
import org.compiere.model.MRole;
@ -46,10 +51,10 @@ import org.compiere.util.Msg;
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.Cell;
import org.zkoss.zul.Hbox;
import org.zkoss.zul.Separator;
import org.zkoss.zul.Vbox;
import org.zkoss.zul.Borderlayout;
import org.zkoss.zul.Center;
import org.zkoss.zul.South;
import org.zkoss.zul.Space;
/**
* Location Dialog : Based on VLocationDialog
@ -65,7 +70,7 @@ public class WLocatorDialog extends Window implements EventListener<Event>
*/
private static final long serialVersionUID = -1013647722305985723L;
private Vbox mainBox = new Vbox();
private Grid mainPanel = GridFactory.newGridLayout();
private Listbox lstLocator = new Listbox();
private Listbox lstWarehouse = new Listbox();
@ -80,13 +85,13 @@ public class WLocatorDialog extends Window implements EventListener<Event>
private Label lblLocator = new Label();
private Label lblWarehouse = new Label();
private Label lblWarehouse2 = new Label();
private Label lblAisleX = new Label();
private Label lblBinY = new Label();
private Label lblLevelZ = new Label();
private Label lblKey = new Label();
private Button btnCancel = new Button();
private Button btnOk = new Button();
private ConfirmPanel confirmPanel;
private MLocatorLookup m_mLocator;
@ -145,149 +150,110 @@ public class WLocatorDialog extends Window implements EventListener<Event>
{
lblLocator.setValue(Msg.translate(Env.getCtx(), "M_Locator_ID"));
lblWarehouse.setValue(Msg.translate(Env.getCtx(), "M_Warehouse_ID"));
lblWarehouse2.setValue(Msg.translate(Env.getCtx(), "M_Warehouse_ID"));
lblAisleX.setValue(Msg.getElement(Env.getCtx(), "X"));
lblBinY.setValue(Msg.getElement(Env.getCtx(), "Y"));
lblLevelZ.setValue(Msg.getElement(Env.getCtx(), "Z"));
lblKey.setValue(Msg.translate(Env.getCtx(), "Value"));
Hbox boxLocator = new Hbox();
boxLocator.setWidth("100%");
lstLocator.setWidth("150px"); // Elaine 2009/02/02 - fixed the locator width
lstLocator.setMold("select");
lstLocator.setRows(0);
LayoutUtils.addSclass("z-label", lstLocator);
Cell cell = new Cell();
cell.setWidth("30%");
boxLocator.appendChild(cell);
cell.appendChild(lblLocator);
cell = new Cell();
cell.setWidth("70%");
boxLocator.appendChild(cell);
cell.appendChild(lstLocator);
Hbox boxCheckbox = new Hbox();
boxCheckbox.setWidth("100%");
boxCheckbox.setPack("start");
chkCreateNew.setLabel(Msg.getMsg(Env.getCtx(), "CreateNew"));
cell = new Cell();
cell.setWidth("100%");
boxCheckbox.appendChild(cell);
cell.appendChild(chkCreateNew);
Hbox boxWarehouse = new Hbox();
boxWarehouse.setWidth("100%");
boxWarehouse.setHflex("true");
lstWarehouse.setWidth("100px");
lstWarehouse.setMold("select");
lstWarehouse.setRows(0);
LayoutUtils.addSclass("z-label", lstWarehouse);
cell = new Cell();
cell.setWidth("30%");
boxWarehouse.appendChild(cell);
cell.appendChild(lblWarehouse);
lblWarehouse.setHflex("true");
cell = new Cell();
cell.setWidth("70%");
boxWarehouse.appendChild(cell);
cell.appendChild(lstWarehouse);
cell.appendChild(txtWarehouse);
confirmPanel = new ConfirmPanel(true);
confirmPanel.addActionListener(this);
Hbox boxAisle = new Hbox();
boxAisle.setWidth("100%");
boxAisle.setHflex("true");
Columns columns = new Columns();
mainPanel.appendChild(columns);
cell = new Cell();
cell.setWidth("30%");
boxAisle.appendChild(cell);
lblAisleX.setHflex("true");
cell.appendChild(lblAisleX);
cell = new Cell();
cell.setWidth("70%");
boxAisle.appendChild(cell);
cell.appendChild(txtAisleX);
Column column = new Column();
columns.appendChild(column);
column.setWidth("30%");
Hbox boxBin = new Hbox();
boxBin.setWidth("100%");
boxBin.setHflex("true");
column = new Column();
columns.appendChild(column);
column.setWidth("70%");
cell = new Cell();
cell.setWidth("30%");
boxBin.appendChild(cell);
cell.appendChild(lblBinY);
lblBinY.setHflex("true");
cell = new Cell();
cell.setWidth("70%");
boxBin.appendChild(cell);
cell.appendChild(txtBinY);
Rows rows = mainPanel.newRows();
Hbox boxLevel = new Hbox();
boxLevel.setWidth("100%");
boxLevel.setHflex("true");
Row row = new Row();
rows.appendChild(row);
row.appendChild(lblLocator);
row.appendChild(lstLocator);
lstLocator.setHflex("1");
cell = new Cell();
cell.setWidth("30%");
boxLevel.appendChild(cell);
cell.appendChild(lblLevelZ);
lblLevelZ.setHflex("true");
cell = new Cell();
cell.setWidth("70%");
boxLevel.appendChild(cell);
cell.appendChild(txtLevelZ);
row = new Row();
rows.appendChild(row);
row.appendChild(new Space());
row.appendChild(chkCreateNew);
Hbox boxKey = new Hbox();
boxKey.setWidth("100%");
boxKey.setHflex("true");
row = new Row();
rows.appendChild(row);
row.appendChild(lblWarehouse);
row.appendChild(lstWarehouse);
lstWarehouse.setHflex("1");
cell = new Cell();
cell.setWidth("30%");
boxKey.appendChild(cell);
cell.appendChild(lblKey);
lblKey.setHflex("true");
cell = new Cell();
cell.setWidth("70%");
boxKey.appendChild(cell);
cell.appendChild(txtKey);
row = new Row();
rows.appendChild(row);
row.appendChild(lblWarehouse2);
row.appendChild(txtWarehouse);
txtWarehouse.setHflex("1");
Hbox boxButtons = new Hbox();
boxButtons.setWidth("100%");
boxButtons.setStyle("padding: 5px;");
boxButtons.setPack("end");
row = new Row();
rows.appendChild(row);
row.appendChild(lblAisleX);
row.appendChild(txtAisleX);
txtAisleX.setHflex("1");
btnOk.setImage(ThemeManager.getThemeResource("images/Ok16.png"));
btnOk.addEventListener(Events.ON_CLICK, this);
row = new Row();
rows.appendChild(row);
row.appendChild(lblBinY);
row.appendChild(txtBinY);
txtBinY.setHflex("1");
btnCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
btnCancel.addEventListener(Events.ON_CLICK, this);
row = new Row();
rows.appendChild(row);
row.appendChild(lblLevelZ);
row.appendChild(txtLevelZ);
txtLevelZ.setHflex("1");
boxButtons.appendChild(btnOk);
boxButtons.appendChild(btnCancel);
row = new Row();
rows.appendChild(row);
row.appendChild(lblKey);
row.appendChild(txtKey);
txtKey.setHflex("1");
mainBox.setWidth("250px");
mainBox.setStyle("text-align:right");
mainBox.appendChild(boxLocator);
mainBox.appendChild(new Separator());
mainBox.appendChild(boxCheckbox);
mainBox.appendChild(new Separator());
mainBox.appendChild(boxWarehouse);
mainBox.appendChild(boxAisle);
mainBox.appendChild(boxBin);
mainBox.appendChild(boxLevel);
mainBox.appendChild(boxKey);
mainBox.appendChild(new Separator());
mainBox.appendChild(boxButtons);
Borderlayout borderlayout = new Borderlayout();
this.appendChild(borderlayout);
borderlayout.setHflex("1");
borderlayout.setVflex("min");
Center centerPane = new Center();
centerPane.setSclass("dialog-content");
centerPane.setAutoscroll(true);
borderlayout.appendChild(centerPane);
centerPane.appendChild(mainPanel);
mainPanel.setVflex("1");
mainPanel.setHflex("1");
South southPane = new South();
southPane.setSclass("dialog-footer");
borderlayout.appendChild(southPane);
southPane.appendChild(confirmPanel);
this.appendChild(mainBox);
this.setTitle(title);
this.setSclass("popup-dialog");
this.setClosable(true);
this.setBorder("normal");
this.setWidth("260Px");
this.setWidth("260px");
this.setShadow(true);
this.setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED);
this.setSizable(true); // Elaine 2009/02/02 - window set to resizable
}
@ -414,8 +380,10 @@ public class WLocatorDialog extends Window implements EventListener<Event>
boolean sel = chkCreateNew.isChecked();
//lblWarehouse.setVisible(sel);
lstWarehouse.setVisible(sel);
lstWarehouse.getParent().setVisible(sel);
//lWarehouseInfo.setVisible(!sel);
txtWarehouse.setVisible(!sel);
txtWarehouse.getParent().setVisible(!sel);
txtWarehouse.setReadonly(true);
txtAisleX.setReadonly(!sel);
@ -423,7 +391,7 @@ public class WLocatorDialog extends Window implements EventListener<Event>
txtLevelZ.setReadonly(!sel);
txtKey.setReadonly(!sel);
//pack();
mainPanel.invalidate();
} // enableNew
/**
@ -596,12 +564,12 @@ public class WLocatorDialog extends Window implements EventListener<Event>
if (event == null)
return;
if (event.getTarget() == btnCancel)
if (event.getTarget() == confirmPanel.getButton(ConfirmPanel.A_CANCEL))
{
m_change = false;
this.detach();
}
else if (event.getTarget() == btnOk)
else if (event.getTarget() == confirmPanel.getButton(ConfirmPanel.A_OK))
{
actionOK();
m_change = true;

View File

@ -830,6 +830,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
winExportFile.setHeight("150px");
winExportFile.setClosable(true);
winExportFile.setBorder("normal");
winExportFile.setSclass("popup-dialog");
winExportFile.setStyle("position:absolute");
cboType.setMold("select");
@ -846,21 +847,22 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
cboType.setSelectedItem(li);
Hbox hb = new Hbox();
hb.setSclass("dialog-content");
hb.setAlign("center");
hb.setPack("start");
Div div = new Div();
div.setStyle("text-align: right;");
div.appendChild(new Label(Msg.getMsg(Env.getCtx(), "FilesOfType")));
hb.appendChild(div);
hb.appendChild(cboType);
cboType.setWidth("100%");
hb.setVflex("1");
hb.setStyle("margin-top: 10px");
Vbox vb = new Vbox();
vb.setVflex("1");
vb.setWidth("100%");
winExportFile.appendChild(vb);
vb.appendChild(hb);
vb.appendChild(confirmPanel);
LayoutUtils.addSclass("dialog-footer", confirmPanel);
confirmPanel.addActionListener(this);
}