1、打开themes文件夹,拷贝一份样式作为自己的样式更改初始样式,我这里拷贝的是flatgrey文件夹,重新命名为qlstyle
2、在文件/ofbiz/framework/common/config/CommonEntityLabels.xml中找要在页面显示的数据,默认这些数据都不存在中文 ,你可以在你新建的标签中添加中文资源
<property key="VisualTheme.description.QL_STYLE">
<value xml:lang="zh">后台管理模块样式</value>
</property>
3、修改 文件ofbiz/themes/qlstyle/ofbiz-component.xml中相关的程序名,等。
<ofbiz-component name="qlstyle"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
<!-- define resource loaders; most common is to use the component resource loader -->
<resource-loader name="main" type="component"/>
<!-- entity resources: model(s), eca(s), group, and data definitions -->
<entity-resource type="data" reader-name="seed" loader="main" location="data/QlstyleThemeData.xml"/>
<!-- web applications; will be mounted when using the embedded Jetty container -->
<webapp name="qlstyle"
title="qlstyle"
menu-name="secondary"
server="default-server"
location="webapp/qlstyle"
mount-point="/qlstyle"
app-bar-display="false"/>
</ofbiz-component>
4、修改文件名称ofbiz/themes/qlstyle/data/FlatGreyThemeData.xml为QlstyleThemeData.xml
5、变更这个文件里面的内容为
<entity-engine-xml>
<VisualTheme visualThemeId="QL_STYLE" visualThemeSetId="BACKOFFICE" description="Qun Li, background management platform"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_NAME" resourceValue="QL_STYLE" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/qlstyle/maincss.css" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_STYLESHEET" resourceValue="/qlstyle/javascript.css" sequenceId="02"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_HELPSTYLESHEET" resourceValue="/qlstyle/help.css" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_DOCBOOKSTYLESHEET" resourceValue="/qlstyle/webapp/qlstyle/docbook.css" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_RTL_STYLESHEET" resourceValue="/qlstyle/mainrtl.css" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_HDR_JAVASCRIPT" resourceValue="/qlstyle/js/application.js" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_SHORTCUT_ICON" resourceValue="/images/ofbiz.ico" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_HDR_IMAGE_URL" resourceValue="/qlstyle/images/ofbiz_logo.gif" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_HDR_TMPLT_LOC" resourceValue="component://qlstyle/includes/header.ftl" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_MSG_TMPLT_LOC" resourceValue="component://common/webcommon/includes/messages.ftl" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_FTR_TMPLT_LOC" resourceValue="component://qlstyle/includes/footer.ftl" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_NAV_TMPLT_LOC" resourceValue="component://qlstyle/includes/appbar.ftl" sequenceId="01"/>
<VisualThemeResource visualThemeId="QL_STYLE" resourceTypeEnumId="VT_SCREENSHOT" resourceValue="/qlstyle/screenshot.jpg" sequenceId="01"/>
</entity-engine-xml>
QL_STYLE要与CommonEntityLabels.xml所添加的key后部分一致
6、重新编译,并启动系统,这样就可以看到自己新建的qlstyle了。好了可以开始修改自己的样式了。(可以切换成中文,就可以看到中文信息了)