From 5971d6dee7a7e3520afcbf1075f515e345805a67 Mon Sep 17 00:00:00 2001 From: Anozi Mada Date: Thu, 2 Jun 2022 16:02:37 +0700 Subject: [PATCH] IDEMPIERE-4740 Fix EMail panel : Attachment is cut at bottom (#1354) * IDEMPIERE-4740 Fix EMail panel : Attachment is cut at bottom --- .../WEB-INF/src/metainfo/zk/lang-addon.xml | 2 +- .../webui/component/AttachmentItem.java | 16 ++++++++-------- .../default/css/fragment/input-element.css.dsp | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml b/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml index 511ad53ae4..1f90a000cb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml +++ b/org.adempiere.ui.zk/WEB-INF/src/metainfo/zk/lang-addon.xml @@ -56,6 +56,6 @@ Copyright (C) 2007 Ashley G Ramdass (ADempiere WebUI). - + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AttachmentItem.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AttachmentItem.java index 606cec4083..3cbe4cd50c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AttachmentItem.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/AttachmentItem.java @@ -23,29 +23,29 @@ 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.A; -import org.zkoss.zul.Hlayout; +import org.zkoss.zul.Span; /** * * @author hengsin * */ -public class AttachmentItem extends Hlayout implements EventListener{ +public class AttachmentItem extends Span implements EventListener{ /** * generate serial id */ - private static final long serialVersionUID = 9105759170502414466L; + private static final long serialVersionUID = -7599391160210459080L; private DataSource ds; private List list; public AttachmentItem(DataSource ds, List list, boolean removable) { - setStyle("border: 1px solid #dcdcdc; background-color: #f5f5f5; " + - "width: auto !important;display: inline-block; height: 21px; " + - "margin-right: 5px; margin-bottom: 5px;padding-left: 5px; padding-right: 5px;"); - appendChild(new Label(ds.getName())); + setSclass("z-attachment-item"); + Label label = new Label(ds.getName()); + label.setSclass("z-attachment-item-text"); + appendChild(label); if (removable) { A x = new A("", ThemeManager.getThemeResource("images/X8.png")); - x.setStyle("float: right; background-color: #f5f5f5"); + x.setSclass("z-attachment-item-del-button"); appendChild(x); this.ds = ds; this.list = list; diff --git a/org.adempiere.ui.zk/WEB-INF/src/web/theme/default/css/fragment/input-element.css.dsp b/org.adempiere.ui.zk/WEB-INF/src/web/theme/default/css/fragment/input-element.css.dsp index aec7346453..f5f4d303e8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/web/theme/default/css/fragment/input-element.css.dsp +++ b/org.adempiere.ui.zk/WEB-INF/src/web/theme/default/css/fragment/input-element.css.dsp @@ -1,3 +1,21 @@ +<%-- Attachment Item --%> +.z-attachment-item { + border: 1px solid #dcdcdc; + border-radius: 4px; + background-color: #f5f5f5; + width: auto !important; + display: inline-block; + margin-right: 5px; + margin-bottom: 5px; + padding-left: 5px; + padding-right: 5px; +} + +.z-attachment-item-del-button { + float: right; + background-color: #f5f5f5; +} + <%-- Combobox --%> .z-combobox-disabled, .z-combobox[disabled], .z-datebox-disabled { color: black !important; cursor: default !important; opacity: 1; -moz-opacity: 1; -khtml-opacity: 1; filter: alpha(opacity=100);