IDEMPIERE-724 Zk: Make iDempiere theme more easily customizable. Fixed hardcoding of style for detail pane title.

This commit is contained in:
Heng Sin Low 2013-05-23 23:08:28 +08:00
parent e0c238c6e8
commit 12efa2b269
4 changed files with 65 additions and 15 deletions

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<config>
<version>
<version-class>org.adempiere.webui.AdempiereWebUI</version-class>
<version-uid>1.0.0</version-uid>
</version>
<taglib>
<taglib-uri>http://www.idempiere.org/dsp/web/util</taglib-uri>
<taglib-location>/WEB-INF/tld/web/idempiere-util.dsp.tld</taglib-location>
</taglib>
</config>

View File

@ -359,20 +359,6 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
div.setWidth("100%");
div.setSpacing("0px");
StringBuilder cssContent = new StringBuilder();
cssContent.append(".adtab-form-borderlayout .z-south-colpsd:before { ");
cssContent.append("content: \"");
cssContent.append(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Detail")));
cssContent.append("\"; ");
cssContent.append("position: relative; font-size: 12px; font-weight: bold; ");
cssContent.append("top: 3px; ");
cssContent.append("left: 4px; ");
cssContent.append("z-index: -1; ");
cssContent.append("} ");
Style style = new Style();
style.setContent(cssContent.toString());
appendChild(style);
Borderlayout layout = new Borderlayout();
layout.setParent(this);
layout.setSclass("adtab-form-borderlayout");

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8" ?>
<taglib>
<uri>http://www.idempiere.org/dsp/web/util</uri>
<description>
Util methods for zweb in DSP
</description>
<function>
<name>getCtx</name>
<function-class>org.compiere.util.Env</function-class>
<function-signature>
java.util.Properties getCtx()
</function-signature>
<description>
Returns current context
</description>
</function>
<function>
<name>getMsg</name>
<function-class>org.compiere.util.Msg</function-class>
<function-signature>
java.lang.String getMsg(java.util.Properties,java.lang.String)
</function-signature>
<description>
Returns translated message
</description>
</function>
<function>
<name>cleanAmp</name>
<function-class>org.compiere.util.Util</function-class>
<function-signature>
java.lang.String cleanAmp(java.lang.String)
</function-signature>
<description>
Clean all ampersand from string
</description>
</function>
</taglib>

View File

@ -1,5 +1,6 @@
<%@ page contentType="text/css;charset=UTF-8" %>
<%@ taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c" %>
<%@ taglib uri="http://www.idempiere.org/dsp/web/util" prefix="u" %>
html,body {
margin: 0;
@ -802,6 +803,16 @@ div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
background-color: #F9F9F9;
}
.adtab-form-borderlayout .z-south-colpsd:before {
content: '${u:cleanAmp(u:getMsg(u:getCtx(), "Detail"))}';
position: relative;
font-size: 12px;
font-weight: bold;
top: 3px;
left: 4px;
z-index: -1;
}
.z-grid tbody tr.highlight td.z-cell {
background-color: #FFFFCC !important;
background-image: none !important;