diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java index 7448c15d4b..89e814bca3 100755 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/acct/WAcctViewer.java @@ -83,6 +83,7 @@ import org.zkoss.zul.Listitem; import org.zkoss.zul.Paging; import org.zkoss.zul.Separator; import org.zkoss.zul.South; +import org.zkoss.zul.Space; /** * Account Viewer : Based on class AcctViewer @@ -264,6 +265,7 @@ public class WAcctViewer extends Window implements EventListener column.setWidth("30%"); columns.appendChild(column); column = new Column(); + column.setWidth("60%"); columns.appendChild(column); Rows rows = grid.newRows(); @@ -275,6 +277,7 @@ public class WAcctViewer extends Window implements EventListener Row row = rows.newRow(); row.appendChild(lacctSchema); row.appendChild(selAcctSchema); + selAcctSchema.setHflex("1"); selDocument.setLabel(Msg.getMsg(Env.getCtx(), "SelectDocument")); selDocument.addEventListener(Events.ON_CHECK, this); @@ -298,6 +301,7 @@ public class WAcctViewer extends Window implements EventListener row = rows.newRow(); row.appendChild(lpostingType); row.appendChild(selPostingType); + selPostingType.setHflex("1"); // Date @@ -321,6 +325,7 @@ public class WAcctViewer extends Window implements EventListener row = rows.newRow(); row.appendChild(lOrg); row.appendChild(selOrg); + selOrg.setHflex("1"); // Account @@ -383,6 +388,7 @@ public class WAcctViewer extends Window implements EventListener displayPanel.appendChild(displayDocumentInfo); displayPanel.appendChild(displaySourceAmt); displayPanel.appendChild(displayQty); + displayPanel.appendChild(new Space()); grid = new Grid(); grid.setSclass("grid-layout"); @@ -402,30 +408,35 @@ public class WAcctViewer extends Window implements EventListener lSort.setValue(Msg.getMsg(Env.getCtx(), "SortBy")); lGroup.setValue(Msg.getMsg(Env.getCtx(), "GroupBy")); row.appendChild(lSort); + lSort.setHflex("1"); row.appendChild(lGroup); row = rows.newRow(); sortBy1.setMold("select"); sortBy1.setRows(1); row.appendChild(sortBy1); + sortBy1.setHflex("1"); row.appendChild(group1); row = rows.newRow(); sortBy2.setMold("select"); sortBy2.setRows(1); row.appendChild(sortBy2); + sortBy2.setHflex("1"); row.appendChild(group2); row = rows.newRow(); sortBy3.setMold("select"); sortBy3.setRows(1); row.appendChild(sortBy3); + sortBy3.setHflex("1"); row.appendChild(group3); row = rows.newRow(); sortBy4.setMold("select"); sortBy4.setRows(1); row.appendChild(sortBy4); + sortBy4.setHflex("1"); row.appendChild(group4); //"images/InfoAccount16.png" diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/BusyDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/BusyDialog.java index ebe5f826cf..06a6019caf 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/BusyDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/BusyDialog.java @@ -13,12 +13,13 @@ *****************************************************************************/ package org.adempiere.webui.apps; +import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.component.Label; import org.adempiere.webui.component.Window; import org.compiere.util.Env; import org.compiere.util.Msg; -import org.zkoss.zul.Hbox; -import org.zkoss.zul.Image; +import org.zkoss.zul.Div; +import org.zkoss.zul.Span; /** * @@ -32,18 +33,22 @@ public class BusyDialog extends Window { public BusyDialog() { super(); - Hbox box = new Hbox(); - box.setStyle("padding: 5px"); + LayoutUtils.addSclass("busy-dialog", this); + + Div box = new Div(); + LayoutUtils.addSclass("busy-dialog-box", box); appendChild(box); - label = new Label(Msg.getMsg(Env.getCtx(), "Processing")); - box.appendChild(label); - Image image = new Image(); + + Span image = new Span(); + LayoutUtils.addSclass("busy-dialog-img", image); box.appendChild(image); - image.setHeight("16px"); - image.setWidth("16px"); - image.setSrc("~./zk/img/progress3.gif"); + + label = new Label(Msg.getMsg(Env.getCtx(), "Processing")); + LayoutUtils.addSclass("busy-dialog-label", label); + box.appendChild(label); + setPosition("center"); - setShadow(true); + setShadow(true); } public void statusUpdate(String message) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java index f0043874b7..ec71958263 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/FeedbackRequestWindow.java @@ -57,9 +57,10 @@ 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.Center; import org.zkoss.zul.Div; -import org.zkoss.zul.Separator; -import org.zkoss.zul.Vlayout; +import org.zkoss.zul.South; /** * @@ -89,7 +90,9 @@ public class FeedbackRequestWindow extends Window implements EventListener private ListModelTable model = null; private WListbox listbox = new WListbox(); - private final static String HISTORY_DIV_START_TAG = "
"; + private final static String HISTORY_DIV_START_TAG = "
"; public WWFActivity() { super(); + LayoutUtils.addSclass("workflow-activity-form", this); } protected void initForm() diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java index abcd8a7703..3d6627a2ee 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/RequestWindow.java @@ -87,8 +87,9 @@ public class RequestWindow extends Window implements EventListener { setTitle(Msg.getMsg(Env.getCtx(),"Event")); setAttribute(Window.MODE_KEY, Window.MODE_HIGHLIGHTED); setWidth("400px"); - setHeight("500px"); + this.setSclass("popup-dialog"); this.setBorder("normal"); + this.setShadow(true); this.setClosable(true); m_readOnly = !MRole.getDefault().canUpdate( @@ -158,6 +159,7 @@ public class RequestWindow extends Window implements EventListener { txtSummary = new Textbox(); txtSummary.setRows(3); txtSummary.setWidth("95%"); + txtSummary.setHeight("100%"); dbxStartPlan = new Datebox(); dbxCompletePlan = new Datebox(); @@ -243,17 +245,23 @@ public class RequestWindow extends Window implements EventListener { tbxEndTime.setWidth("40%"); Borderlayout borderlayout = new Borderlayout(); - appendChild(borderlayout); + this.appendChild(borderlayout); + borderlayout.setHflex("1"); + borderlayout.setVflex("min"); - Center center = new Center(); - borderlayout.appendChild(center); - center.appendChild(grid); + Center centerPane = new Center(); + centerPane.setSclass("dialog-content"); + centerPane.setAutoscroll(true); + borderlayout.appendChild(centerPane); + + centerPane.appendChild(grid); grid.setVflex("1"); grid.setHflex("1"); - - South south = new South(); - borderlayout.appendChild(south); - south.appendChild(confirmPanel); + + South southPane = new South(); + southPane.setSclass("dialog-footer"); + borderlayout.appendChild(southPane); + southPane.appendChild(confirmPanel); dbxStartPlan.setValue(ce.getBeginDate()); dbxCompletePlan.setValue(ce.getEndDate()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java index b823bcd363..d4b3d805f6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java @@ -194,8 +194,7 @@ public abstract class AbstractMenuPanel extends Panel implements EventListener, ValueCha this.setWidgetAttribute(AdempiereWebUI.WIDGET_INSTANCE_NAME, "findWindow"); this.setId("findWindow_"+targetWindowNo); + LayoutUtils.addSclass("find-window", this); } public boolean initialize() @@ -366,7 +368,8 @@ public class FindWindow extends Window implements EventListener, ValueCha contentSimple.setVflex(true); Borderlayout layout = new Borderlayout(); - layout.setStyle("height: 100%; width: 99%; position: relative"); + layout.setHflex("1"); + layout.setVflex("1"); winLookupRecord.appendChild(layout); Center center = new Center(); @@ -382,6 +385,7 @@ public class FindWindow extends Window implements EventListener, ValueCha winLookupRecord.setWidth("100%"); winLookupRecord.setHeight("100%"); winLookupRecord.addEventListener(Events.ON_OK, this); + LayoutUtils.addSclass("find-window-simple", winLookupRecord); } // initSimple @@ -468,19 +472,25 @@ public class FindWindow extends Window implements EventListener, ValueCha advancedPanel.appendChild(listhead); advancedPanel.setVflex(true); - Vlayout vlayout = new Vlayout(); - vlayout.setStyle("width: 100%; height: 100%; position: relative"); - vlayout.setVflex("1"); - winAdvanced.appendChild(vlayout); - toolBar.setVflex("0"); - vlayout.appendChild(toolBar); - vlayout.appendChild(advancedPanel); - confirmPanel.setVflex("0"); - vlayout.appendChild(confirmPanel); + Borderlayout layout = new Borderlayout(); + layout.setHflex("1"); + layout.setVflex("1"); + winAdvanced.appendChild(layout); + + Center center = new Center(); + layout.appendChild(center); + center.appendChild(advancedPanel); + advancedPanel.setVflex("1"); + advancedPanel.setHflex("1"); + + South south = new South(); + layout.appendChild(south); + south.appendChild(confirmPanel); winAdvanced.setHeight("100%"); winAdvanced.setWidth("99%"); winAdvanced.addEventListener(Events.ON_OK,this); + LayoutUtils.addSclass("find-window-advanced", winAdvanced); } // initAdvanced diff --git a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp index 8f27982e9c..758f47b232 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -1605,3 +1605,59 @@ table.z-vbox > tbody > tr > td > table { } .about-main-panel-links { } + +<%-- busy dialog --%> +.busy-dialog { + cursor: wait; + background-color: transparent; +} + +.busy-dialog-box { + background-color: transparent; + padding: 9px; +} + +.busy-dialog-img { + height: 16px; + width: 16px; + background: transparent no-repeat center; + background-image: url(../images/progress3.gif) !important; + display: -moz-inline-box; + vertical-align: top; + display: inline-block; +} + +.busy-dialog-label { + color: #363636; +} + +<%-- tab editor --%> +.tab-editor-form { +} +.tab-editor-form-east-panel { +} +.tab-editor-form-center-panel { +} +.tab-editor-form-west-panel { +} + +<%-- workflow activity --%> +.workflow-activity-form { +} + +<%-- find window --%> +.find-window { +} +.find-window-simple { +} +.find-window-advanced { +} + +.find-window-simple .z-south .z-hbox, .find-window-advanced .z-south .z-hbox { + margin-top: 5px; +} + +.find-window-simple .img-btn, .find-window-simple .img-btn.btn-ok.z-button-os, .find-window-simple .img-btn.btn-cancel.z-button-os, +.find-window-advanced .img-btn, .find-window-advanced .img-btn.btn-ok.z-button-os, .find-window-advanced .img-btn.btn-cancel.z-button-os { + margin: 0 2px; +} \ No newline at end of file diff --git a/org.adempiere.ui.zk/theme/default/images/progress3.gif b/org.adempiere.ui.zk/theme/default/images/progress3.gif new file mode 100644 index 0000000000..d42f72c723 Binary files /dev/null and b/org.adempiere.ui.zk/theme/default/images/progress3.gif differ diff --git a/org.idempiere.ui.zk.selenium/src/fitlibrary/zk/ZkFixture.java b/org.idempiere.ui.zk.selenium/src/fitlibrary/zk/ZkFixture.java index 7218a029b1..13683ed91b 100644 --- a/org.idempiere.ui.zk.selenium/src/fitlibrary/zk/ZkFixture.java +++ b/org.idempiere.ui.zk.selenium/src/fitlibrary/zk/ZkFixture.java @@ -3,6 +3,7 @@ */ package fitlibrary.zk; +import java.io.File; import java.util.List; import org.idempiere.ui.zk.selenium.Widget; @@ -258,6 +259,21 @@ public class ZkFixture extends SpiderFixture { actions.contextClick(element).build().perform(); } + @SimpleAction(wiki = "|''file upload''|xpath, id or other locator|''file path''|path of file|", tooltip = "Uploads file from the given path.") + public boolean fileUploadFilePath(String locator, String filePath) throws Exception{ + if(filePath.equals("")){ + throw new Exception("file path is not specified."); + } + File file = new File(filePath); + String ext = filePath.substring(filePath.trim().lastIndexOf("."), filePath.length()).toLowerCase(); + if(!file.exists() || !(ext.endsWith(".jpg") || ext.endsWith(".bmp") || ext.endsWith(".png") || ext.endsWith(".ico"))){ + throw new Exception("Upload an image of type jpg, bmp, png or ico."); + } + WebElement fileInput = webDriver.findElement(By.xpath(locator)); + fileInput.sendKeys(filePath); + return true; + } + /** * Causes the currently executing thread to sleep for the specified number * of milliseconds, subject to the precision and accuracy of system timers