diff --git a/org.adempiere.base/src/org/compiere/model/MSysConfig.java b/org.adempiere.base/src/org/compiere/model/MSysConfig.java index 5bbbe2e5bb..c8b19c466e 100644 --- a/org.adempiere.base/src/org/compiere/model/MSysConfig.java +++ b/org.adempiere.base/src/org/compiere/model/MSysConfig.java @@ -42,7 +42,7 @@ public class MSysConfig extends X_AD_SysConfig /** * */ - private static final long serialVersionUID = 2907227045981641758L; + private static final long serialVersionUID = -1248226696518701944L; public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION"; public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS"; @@ -80,6 +80,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String DPVIEWS_SHOWINFOSCHEDULE = "DPViews_ShowInfoSchedule"; public static final String ENABLE_PAYMENTBOX_BUTTON = "ENABLE_PAYMENTBOX_BUTTON"; public static final String GRIDTABLE_LOAD_TIMEOUT_IN_SECONDS = "GRIDTABLE_LOAD_TIMEOUT_IN_SECONDS"; + public static final String HTML_REPORT_THEME = "HTML_REPORT_THEME"; public static final String Invoice_ReverseUseNewNumber = "Invoice_ReverseUseNewNumber"; public static final String JASPER_SWAP_MAX_PAGES = "JASPER_SWAP_MAX_PAGES"; public static final String LASTRUN_RECORD_COUNT = "LASTRUN_RECORD_COUNT"; diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/report/HTMLExtension.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/report/HTMLExtension.java index 9c77c1f13c..fea7606e7f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/report/HTMLExtension.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/report/HTMLExtension.java @@ -33,22 +33,24 @@ import org.compiere.util.Msg; */ public class HTMLExtension implements IHTMLExtension { - private String contextPath; private String classPrefix; private String componentId; - private String reportTheme; + private String scriptURL; + private String styleURL; public HTMLExtension(String contextPath, String classPrefix, String componentId) { - - String theme = MSysConfig.getValue( "HTML_REPORT_THEME" , "" ); - - if ( theme != null ) { - reportTheme = "/" + theme; - } - - this.contextPath = contextPath; + + String theme = MSysConfig.getValue(MSysConfig.HTML_REPORT_THEME, "/", Env.getAD_Client_ID(Env.getCtx())); + + if (! theme.startsWith("/")) + theme = "/" + theme; + if (! theme.endsWith("/")) + theme = theme + "/"; + this.classPrefix = classPrefix; this.componentId = componentId; + this.scriptURL = contextPath + theme + "js/report.js"; + this.styleURL = contextPath + theme + "css/report.css"; } public void extendIDColumn(int row, ConcreteElement columnElement, a href, @@ -115,11 +117,11 @@ public class HTMLExtension implements IHTMLExtension { } public String getScriptURL() { - return contextPath + reportTheme + "/js/report.js"; + return scriptURL; } public String getStyleURL() { - return contextPath + reportTheme + "/css/report.css"; + return styleURL; } }