IDEMPIERE-2355 - Allow to style the summary rows of HTML report / peer review

This commit is contained in:
Carlos Ruiz 2014-12-17 17:00:42 -05:00
parent c660a0af9b
commit 72bb8e620a
2 changed files with 16 additions and 13 deletions

View File

@ -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";

View File

@ -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" , "" );
String theme = MSysConfig.getValue(MSysConfig.HTML_REPORT_THEME, "/", Env.getAD_Client_ID(Env.getCtx()));
if ( theme != null ) {
reportTheme = "/" + theme;
}
if (! theme.startsWith("/"))
theme = "/" + theme;
if (! theme.endsWith("/"))
theme = theme + "/";
this.contextPath = contextPath;
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;
}
}