From 6b8247ca1c5ef33a6cd1188416855ed6a10554cc Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 14 Mar 2012 10:36:39 +0800 Subject: [PATCH] IDEMPIERE-182 Zk6: Fixed alignment of confirmation panel. --- .../src/org/adempiere/webui/apps/ProcessDialog.java | 4 ++-- .../org/adempiere/webui/component/ConfirmPanel.java | 12 ++++++++---- .../src/org/adempiere/webui/window/FindWindow.java | 4 +++- org.adempiere.ui.zk/theme/default/css/theme.css.dsp | 5 +++++ 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java index d6e7469db4..a635006d0a 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessDialog.java @@ -155,7 +155,7 @@ public class ProcessDialog extends Window implements EventListener, IProcessMoni bOK.setImage("/images/Ok16.png"); bOK.setId("Ok"); bOK.addEventListener(Events.ON_CLICK, this); - bOK.setSclass("action-button"); + bOK.setSclass("action-image-text-button"); hbox.appendChild(bOK); label = Msg.getMsg(Env.getCtx(), "Cancel"); @@ -163,7 +163,7 @@ public class ProcessDialog extends Window implements EventListener, IProcessMoni btn.setImage("/images/Cancel16.png"); btn.setId("Cancel"); btn.addEventListener(Events.ON_CLICK, this); - btn.setSclass("action-button"); + btn.setSclass("action-image-text-button"); hbox.appendChild(btn); div.appendChild(hbox); div.setStyle("padding: 10px"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java index 32b7fff2d5..2bb1cd93a1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ConfirmPanel.java @@ -229,20 +229,24 @@ public final class ConfirmPanel extends Hbox private void init() { pnlBtnLeft = new Panel(); - pnlBtnLeft.setAlign("left"); + pnlBtnLeft.setStyle("text-align:left"); pnlBtnRight = new Panel(); - pnlBtnRight.setAlign("right"); + pnlBtnRight.setStyle("text-align:right"); hboxBtnRight = new Hbox(); hboxBtnRight.appendChild(pnlBtnRight); hboxBtnRight.setWidth("100%"); - hboxBtnRight.setStyle("text-align:right"); +// hboxBtnRight.setStyle("text-align:right"); + hboxBtnRight.setPack("end"); + hboxBtnRight.setHflex("1"); hboxBtnLeft = new Hbox(); hboxBtnLeft.appendChild(pnlBtnLeft); hboxBtnLeft.setWidth("100%"); - hboxBtnLeft.setStyle("text-align:left"); +// hboxBtnLeft.setStyle("text-align:left"); + hboxBtnLeft.setPack("start"); + hboxBtnLeft.setHflex("1"); this.appendChild(hboxBtnLeft); this.appendChild(hboxBtnRight); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index 45b65e3213..a4a4218363 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -282,11 +282,13 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe Panel pnlButtonRight = new Panel(); pnlButtonRight.appendChild(btnOk); pnlButtonRight.appendChild(btnCancel); - pnlButtonRight.setAlign("right"); + pnlButtonRight.setStyle("text-align:right"); pnlButtonRight.setWidth("100%"); + pnlButtonRight.setHflex("1"); Panel pnlButtonLeft = new Panel(); pnlButtonLeft.appendChild(btnNew); + pnlButtonLeft.setHflex("1"); Hbox hboxButton = new Hbox(); hboxButton.appendChild(pnlButtonLeft); 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 205ebde5c9..3442fbefeb 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -162,6 +162,11 @@ html,body { width: 80px; } +.action-image-text-button { + height: 32px; + width: 80px; +} + .editor-button { width: 26px; padding: 0px;