hg merge release-3.1 (merge release3.1 into development)
This commit is contained in:
commit
f2e7fed0a3
|
@ -1,6 +1,6 @@
|
|||
<project name="zklibrary" basedir="." default="copy">
|
||||
<target name="copy">
|
||||
<!-- maybe it's same file in org.idempiere.fitnesse.server, just diference version-->
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/fitnesse2.jar" dest="fitnesse2.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/fitnesse2.jar" dest="fitnesse2.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
http://mvnrepository.com/artifact/org.apache.bsf/bsf-all/3.0-beta3
|
||||
<get src="http://central.maven.org/maven2/org/apache/bsf/bsf-all/3.0-beta3/bsf-all-3.0-beta3.jar" dest="bsf-all-3.0-beta3.jar" usetimestamp="true" verbose="true" retries="5"/>
|
||||
-->
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/jython-engine.jar" dest="jython-engine.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/groovy-engine.jar" dest="groovy-engine.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/bsh-engine.jar" dest="bsh-engine.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/jython-engine.jar" dest="jython-engine.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/groovy-engine.jar" dest="groovy-engine.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/bsh-engine.jar" dest="bsh-engine.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/org/python/jython/2.2.1/jython-2.2.1.jar" dest="jython.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/it/sauronsoftware/cron4j/cron4j/2.2.5/cron4j-2.2.5.jar" dest="cron4j-2.2.5.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/net/sourceforge/barbecue/barbecue/1.5-beta1/barbecue-1.5-beta1.jar" dest="barbecue-1.5-beta1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
|
@ -20,6 +20,6 @@
|
|||
<get src="http://central.maven.org/maven2/net/sf/barcode4j/barcode4j/2.1/barcode4j-2.1.jar" dest="barcode4j-2.1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/1.46/bcprov-jdk15on-1.46.jar" dest="bcprov-jdk15on-1.46.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/org/passay/passay/1.0/passay-1.0.jar" dest="passay-1.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/jnlp.jar" dest="jnlp.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/jnlp.jar" dest="jnlp.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
*****************************************************************************/
|
||||
package org.compiere.print;
|
||||
|
||||
import static org.compiere.model.SystemIDs.TABLE_AD_TABLE;
|
||||
import static org.compiere.model.SystemIDs.PROCESS_RPT_M_INVENTORY;
|
||||
import static org.compiere.model.SystemIDs.PROCESS_RPT_M_MOVEMENT;
|
||||
import static org.compiere.model.SystemIDs.TABLE_AD_TABLE;
|
||||
|
||||
import java.awt.Color;
|
||||
import java.awt.Font;
|
||||
|
@ -807,14 +807,14 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
if (extension != null && extension.getStyleURL() != null)
|
||||
{
|
||||
// maybe cache style content with key is path
|
||||
String pathStyleFile = extension.getFullPathStyle();
|
||||
String pathStyleFile = extension.getFullPathStyle(); // creates a temp file - delete below
|
||||
Path path = Paths.get(pathStyleFile);
|
||||
List<String> styleLines = Files.readAllLines(path, Ini.getCharset());
|
||||
Files.delete(path); // delete temp file
|
||||
StringBuilder styleBuild = new StringBuilder();
|
||||
for (String styleLine : styleLines){
|
||||
styleBuild.append(styleLine);
|
||||
styleBuild.append(styleLine); //.append("\n");
|
||||
}
|
||||
|
||||
appendInlineCss (doc, styleBuild);
|
||||
}
|
||||
if (extension != null && extension.getScriptURL() != null && !isExport)
|
||||
|
@ -2092,4 +2092,5 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
return String.format(CSS_SELECTOR_TEMPLATE, index + 1);
|
||||
}
|
||||
}
|
||||
|
||||
} // ReportEngine
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<project name="zklibrary" basedir="." default="copy">
|
||||
<target name="copy">
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/spiffy-with_source-all-0.05.jar" dest="spiffy-with_source-all-0.05.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/extend.jar" dest="extend.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/spiffy-with_source-all-0.05.jar" dest="spiffy-with_source-all-0.05.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/extend.jar" dest="extend.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<target name="copy">
|
||||
<!-- seem payment sdk is change without use verisign.jar, i can find out this lib. maybe have to update this plug-in
|
||||
http://paypal.github.io/sdk/#ppo-payflow-->
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/jpayment.jar" dest="jpayment.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/Verisign.jar" dest="Verisign.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/payflow.jar" dest="payflow.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/jpayment.jar" dest="jpayment.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/Verisign.jar" dest="Verisign.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/payflow.jar" dest="payflow.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<get src="http://central.maven.org/maven2/net/sf/jasperreports/jasperreports-fonts/5.6.1/jasperreports-fonts-5.6.1.jar" dest="lib/jasperreports-fonts-5.6.1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/com/fasterxml/jackson/core/jackson-core/2.1.4/jackson-core-2.1.4.jar" dest="lib/jackson-core-2.1.4.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/xalan/xalan/2.7.1/xalan-2.7.1.jar" dest="lib/xalan-2.7.1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/jasperreports-functions-5.6.1.jar" dest="lib/jasperreports-functions-5.6.1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/jasperreports-functions-5.6.1.jar" dest="lib/jasperreports-functions-5.6.1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/joda-time/joda-time/2.1/joda-time-2.1.jar" dest="lib/joda-time-2.1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<project name="zklibrary" basedir="." default="copy">
|
||||
<target name="copy">
|
||||
<mkdir dir="data/seed" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/Adempiere_pg84.jar" dest="data/seed/Adempiere_pg84.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/Adempiere_pg.jar" dest="data/seed/Adempiere_pg.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/Adempiere.jar" dest="data/seed/Adempiere.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/database/3.1/Adempiere_pg84.jar" dest="data/seed/Adempiere_pg84.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/database/3.1/Adempiere_pg.jar" dest="data/seed/Adempiere_pg.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/database/3.1/Adempiere.jar" dest="data/seed/Adempiere.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
|
||||
<mkdir dir="../db/ddlutils/lib" />
|
||||
<get src="http://central.maven.org/maven2/ant-contrib/ant-contrib/1.0b2/ant-contrib-1.0b2.jar" dest="../db/ddlutils/lib/ant-contrib-1.0b1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
|
@ -18,21 +18,21 @@
|
|||
<get src="http://central.maven.org/maven2/commons-pool/commons-pool/1.2/commons-pool-1.2.jar" dest="../db/ddlutils/lib/commons-pool-1.2.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/org/apache/ddlutils/ddlutils/1.0/ddlutils-1.0.jar" dest="../db/ddlutils/lib/DdlUtils-1.0-RC1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/dom4j/dom4j/1.4/dom4j-1.4.jar" dest="../db/ddlutils/lib/dom4j-1.4.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/fyracle.jar" dest="../db/ddlutils/lib/fyracle.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/fyracle.jar" dest="../db/ddlutils/lib/fyracle.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/oro/oro/2.0.8/oro-2.0.8.jar" dest="../db/ddlutils/lib/jakarta-oro-2.0.8.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/oracle.jar" dest="../db/ddlutils/lib/oracle.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/postgresql.jar" dest="../db/ddlutils/lib/postgresql.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/oracle.jar" dest="../db/ddlutils/lib/oracle.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/postgresql.jar" dest="../db/ddlutils/lib/postgresql.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/stax/stax-api/1.0.1/stax-api-1.0.1.jar" dest="../db/ddlutils/lib/stax-api-1.0.1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/woodstox/wstx-asl/3.0.2/wstx-asl-3.0.2.jar" dest="../db/ddlutils/lib/wstx-asl-3.0.2.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<mkdir dir="../db/ddlutils/postgresql/pljava" />
|
||||
<get src="http://central.maven.org/maven2/woodstox/wstx-asl/3.0.2/wstx-asl-3.0.2.jar" dest="../db/ddlutils/lib/wstx-asl-3.0.2.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
|
||||
<mkdir dir="../fitnesse/FitNesseRoot/FitLibraryWeb" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/101-20121212164242.zip" dest="../fitnesse/FitNesseRoot/FitLibraryWeb/101-20121212164242.zip" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/21-20121212154702.zip" dest="../fitnesse/FitNesseRoot/FitLibraryWeb/21-20121212154702.zip" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/6-20121212124109.zip" dest="../fitnesse/FitNesseRoot/FitLibraryWeb/6-20121212124109.zip" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/101-20121212164242.zip" dest="../fitnesse/FitNesseRoot/FitLibraryWeb/101-20121212164242.zip" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/21-20121212154702.zip" dest="../fitnesse/FitNesseRoot/FitLibraryWeb/21-20121212154702.zip" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/6-20121212124109.zip" dest="../fitnesse/FitNesseRoot/FitLibraryWeb/6-20121212124109.zip" usetimestamp="true" verbose="true" retries="5" />
|
||||
<!-- maybe it's same file in org.idempiere.fitnesse.server, just diference version-->
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/fitnesse2.jar" dest="../fitnesse/fitnesse.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/fitnesse2.jar" dest="../fitnesse/fitnesse.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
|
||||
<mkdir dir="../ztl" />
|
||||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/ztl/ztl/2.0.0-SNAPSHOT/ztl-2.0.0-SNAPSHOT.jar" dest="../ztl/ztl-2.0.0-SNAPSHOT.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<project name="zklibrary" basedir="." default="copy">
|
||||
<target name="copy">
|
||||
<mkdir dir="WEB-INF/lib" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/jardiff.jar" dest="WEB-INF/lib/jardiff.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/jnlp-servlet.jar" dest="WEB-INF/lib/jnlp-servlet.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/jardiff.jar" dest="WEB-INF/lib/jardiff.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/jnlp-servlet.jar" dest="WEB-INF/lib/jnlp-servlet.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
<get src="http://central.maven.org/maven2/com/jgoodies/looks/2.0.4/looks-2.0.4.jar" dest="looks-2.0.4.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<!-- old version is only for swing, but can't find out old version, so use jar for Swing, SWT and JavaFX to keep same version -->
|
||||
<get src="http://central.maven.org/maven2/com/miglayout/miglayout/3.7.1/miglayout-3.7.1.jar" dest="miglayout-3.7.1-swing.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/jpedal.jar" dest="jpedal.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/jpedal.jar" dest="jpedal.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -798,8 +798,7 @@ public class DashboardController implements EventListener<Event> {
|
|||
Iframe iframe = new Iframe();
|
||||
iframe.setSclass("dashboard-report-iframe");
|
||||
File file = File.createTempFile(re.getName(), ".html");
|
||||
re.createHTML(file, false, AEnv.getLanguage(Env.getCtx()), new HTMLExtension(Executions.getCurrent().getDesktop().getWebApp().getRealPath("/"),
|
||||
Executions.getCurrent().getContextPath(), "rp",
|
||||
re.createHTML(file, false, AEnv.getLanguage(Env.getCtx()), new HTMLExtension(Executions.getCurrent().getContextPath(), "rp",
|
||||
SessionManager.getAppDesktop().getComponent().getUuid()));
|
||||
AMedia media = new AMedia(re.getName(), "html", "text/html", file, false);
|
||||
iframe.setContent(media);
|
||||
|
|
|
@ -269,8 +269,7 @@ public class WAttachment extends Window implements EventListener<Event>
|
|||
bLoad.setId("bLoad");
|
||||
// bLoad.setAttribute("org.zkoss.zul.image.preload", Boolean.TRUE);
|
||||
bLoad.setTooltiptext(Msg.getMsg(Env.getCtx(), "Load"));
|
||||
// bLoad.setUpload(AdempiereWebUI.getUploadSetting());
|
||||
bLoad.setUpload("true,accept=audio/*|video/*|image/*|MIME_type,native");
|
||||
bLoad.setUpload("multiple=true," + AdempiereWebUI.getUploadSetting());
|
||||
bLoad.addEventListener(Events.ON_UPLOAD, this);
|
||||
|
||||
bDelete.addEventListener(Events.ON_CLICK, this);
|
||||
|
@ -386,6 +385,7 @@ public class WAttachment extends Window implements EventListener<Event>
|
|||
}
|
||||
else
|
||||
{
|
||||
clearPreview();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -478,7 +478,11 @@ public class WAttachment extends Window implements EventListener<Event>
|
|||
if (e instanceof UploadEvent) {
|
||||
preview.setVisible(false);
|
||||
UploadEvent ue = (UploadEvent) e;
|
||||
processUploadMedia(ue.getMedia());
|
||||
for (Media media : ue.getMedias()) {
|
||||
processUploadMedia(media);
|
||||
}
|
||||
clearPreview();
|
||||
autoPreview (cbContent.getSelectedIndex(), false);
|
||||
} else if (e.getTarget() == bOk || DialogEvents.ON_WINDOW_CLOSE.equals(e.getName())) {
|
||||
if (m_attachment != null) {
|
||||
String newText = text.getText();
|
||||
|
@ -552,8 +556,6 @@ public class WAttachment extends Window implements EventListener<Event>
|
|||
{
|
||||
m_attachment.updateEntry(i, getMediaData(media));
|
||||
cbContent.setSelectedIndex(i);
|
||||
clearPreview();
|
||||
autoPreview(cbContent.getSelectedIndex(), false);
|
||||
m_change = true;
|
||||
return;
|
||||
}
|
||||
|
@ -564,8 +566,6 @@ public class WAttachment extends Window implements EventListener<Event>
|
|||
{
|
||||
cbContent.appendItem(media.getName(), media.getName());
|
||||
cbContent.setSelectedIndex(cbContent.getItemCount()-1);
|
||||
autoPreview(cbContent.getSelectedIndex(), false);
|
||||
clearPreview();
|
||||
m_change = true;
|
||||
}
|
||||
}
|
||||
|
@ -610,8 +610,10 @@ public class WAttachment extends Window implements EventListener<Event>
|
|||
{
|
||||
if (result)
|
||||
{
|
||||
m_attachment.delete(true);
|
||||
m_attachment = null;
|
||||
if (m_attachment != null) {
|
||||
m_attachment.delete(true);
|
||||
m_attachment = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -13,6 +13,13 @@
|
|||
*****************************************************************************/
|
||||
package org.adempiere.webui.report;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.theme.ThemeManager;
|
||||
import org.apache.ecs.ConcreteElement;
|
||||
|
@ -36,9 +43,8 @@ public class HTMLExtension implements IHTMLExtension {
|
|||
private String componentId;
|
||||
private String scriptURL;
|
||||
private String styleURL;
|
||||
private String contextFullPath;
|
||||
|
||||
public HTMLExtension(String contextFullPath, String contextPath, String classPrefix, String componentId) {
|
||||
public HTMLExtension(String contextPath, String classPrefix, String componentId) {
|
||||
|
||||
String theme = MSysConfig.getValue(MSysConfig.HTML_REPORT_THEME, "/", Env.getAD_Client_ID(Env.getCtx()));
|
||||
|
||||
|
@ -51,7 +57,6 @@ public class HTMLExtension implements IHTMLExtension {
|
|||
this.componentId = componentId;
|
||||
this.scriptURL = contextPath + theme + "js/report.js";
|
||||
this.styleURL = contextPath + theme + "css/report.css";
|
||||
this.contextFullPath = contextFullPath;
|
||||
}
|
||||
|
||||
public void extendIDColumn(int row, ConcreteElement columnElement, a href,
|
||||
|
@ -94,15 +99,44 @@ public class HTMLExtension implements IHTMLExtension {
|
|||
|
||||
}
|
||||
|
||||
public String getFullPathStyle (){
|
||||
public String getFullPathStyle() {
|
||||
String theme = MSysConfig.getValue(MSysConfig.HTML_REPORT_THEME, "/", Env.getAD_Client_ID(Env.getCtx()));
|
||||
|
||||
if (! theme.startsWith("/"))
|
||||
theme = "/" + theme;
|
||||
if (! theme.endsWith("/"))
|
||||
theme = theme + "/";
|
||||
|
||||
return contextFullPath + theme + "css/report.css";
|
||||
String resFile = theme + "css/report.css";
|
||||
|
||||
URL urlFile = this.getClass().getResource(resFile);
|
||||
if (urlFile == null) {
|
||||
resFile = "/css/report.css"; // default
|
||||
urlFile = this.getClass().getResource(resFile);
|
||||
}
|
||||
if (urlFile != null) {
|
||||
FileOutputStream cssStream = null;
|
||||
File cssFile = null;
|
||||
try {
|
||||
// copy the resource to a temporary file to process it with 2pack
|
||||
InputStream stream = urlFile.openStream();
|
||||
cssFile = File.createTempFile("report", ".css");
|
||||
cssStream = new FileOutputStream(cssFile);
|
||||
byte[] buffer = new byte[1024];
|
||||
int read;
|
||||
while((read = stream.read(buffer)) != -1){
|
||||
cssStream.write(buffer, 0, read);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new AdempiereException(e);
|
||||
} finally{
|
||||
if (cssStream != null) {
|
||||
try {
|
||||
cssStream.close();
|
||||
} catch (Exception e2) {}
|
||||
}
|
||||
}
|
||||
return cssFile.getAbsolutePath();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1043,8 +1043,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
|
|||
{
|
||||
StringWriter sw = new StringWriter();
|
||||
String contextPath = Executions.getCurrent().getContextPath();
|
||||
String contextFullPath = Executions.getCurrent().getDesktop().getWebApp().getRealPath("/");
|
||||
m_reportEngine.createHTML(sw, false, m_reportEngine.getPrintFormat().getLanguage(), new HTMLExtension(contextFullPath, contextPath, "rp", this.getUuid()), true);
|
||||
m_reportEngine.createHTML(sw, false, m_reportEngine.getPrintFormat().getLanguage(), new HTMLExtension(contextPath, "rp", this.getUuid()), true);
|
||||
data = sw.getBuffer().toString().getBytes();
|
||||
}
|
||||
else if (ext.equals("xls"))
|
||||
|
@ -1424,13 +1423,11 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
|
|||
|
||||
private ZkReportViewer viewer;
|
||||
private String contextPath;
|
||||
private String contextFullPath;
|
||||
|
||||
public HTMLRendererRunnable(ZkReportViewer viewer) {
|
||||
super();
|
||||
this.viewer = viewer;
|
||||
contextPath = Executions.getCurrent().getContextPath();
|
||||
contextFullPath = Executions.getCurrent().getDesktop().getWebApp().getRealPath("/");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1445,7 +1442,7 @@ public class ZkReportViewer extends Window implements EventListener<Event>, ITab
|
|||
log.log(Level.FINE, "Path="+path + " Prefix="+prefix);
|
||||
}
|
||||
File file = File.createTempFile(prefix, ".html", new File(path));
|
||||
viewer.m_reportEngine.createHTML(file, false, viewer.m_reportEngine.getPrintFormat().getLanguage(), new HTMLExtension(contextFullPath, contextPath, "rp", viewer.getUuid()));
|
||||
viewer.m_reportEngine.createHTML(file, false, viewer.m_reportEngine.getPrintFormat().getLanguage(), new HTMLExtension(contextPath, "rp", viewer.getUuid()));
|
||||
viewer.media = new AMedia(file.getName(), "html", "text/html", file, false);
|
||||
} catch (Exception e) {
|
||||
if (e instanceof RuntimeException)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<get src="http://central.maven.org/maven2/org/atmosphere/atmosphere-compat-tomcat/1.0.4/atmosphere-compat-tomcat-1.0.4.jar" dest="WEB-INF/lib/atmosphere-compat-tomcat-1.0.4.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/org/atmosphere/atmosphere-compat-tomcat7/1.0.4/atmosphere-compat-tomcat7-1.0.4.jar" dest="WEB-INF/lib/atmosphere-compat-tomcat7-1.0.4.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/org/atmosphere/atmosphere-runtime/1.0.4/atmosphere-runtime-1.0.4.jar" dest="WEB-INF/lib/atmosphere-runtime-1.0.4.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/labelapplet.jar" dest="labelapplet.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/labelapplet.jar" dest="labelapplet.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
http://central.maven.org/maven2/org/codeartisans/thirdparties/swing/org-netbeans-api-visual/2.23.1/org-netbeans-api-visual-2.23.1.jar
|
||||
http://central.maven.org/maven2/org/codeartisans/thirdparties/swing/org-openide-util/8.6.2/org-openide-util-8.6.2.jar
|
||||
-->
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/org-netbeans-api-visual.jar" dest="org-netbeans-api-visual.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/org-openide-util.jar" dest="org-openide-util.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/org-netbeans-api-visual.jar" dest="org-netbeans-api-visual.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/org-openide-util.jar" dest="org-openide-util.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<target name="copy">
|
||||
<get src="http://central.maven.org/maven2/com/mchange/c3p0/0.9.5/c3p0-0.9.5.jar" dest="c3p0-0.9.5.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/com/mchange/mchange-commons-java/0.2.9/mchange-commons-java-0.2.9.jar" dest="mchange-commons-java-0.2.9.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/c3p0-oracle-thin-extras-0.9.5.jar" dest="c3p0-oracle-thin-extras-0.9.5.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/ojdbc7.jar" dest="ojdbc7.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/c3p0-oracle-thin-extras-0.9.5.jar" dest="c3p0-oracle-thin-extras-0.9.5.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/ojdbc7.jar" dest="ojdbc7.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<project name="zklibrary" basedir="." default="copy">
|
||||
<target name="copy">
|
||||
<mkdir dir="lib" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/fitlibrary-2.0.jar" dest="lib/fitlibrary-2.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/fitnesse.jar" dest="lib/fitnesse.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/fitlibraryweb-2.0.jar" dest="lib/fitlibraryweb-2.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/fitlibrary-2.0.jar" dest="lib/fitlibrary-2.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/fitnesse.jar" dest="lib/fitnesse.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/fitlibraryweb-2.0.jar" dest="lib/fitlibraryweb-2.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<!--old version is 2.35, can't find out in maven also homepage.
|
||||
when host old version (2.35) to bitbucket.org can't donwload by ant, maybe big file (even it's download normal with browse).
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
<get src="http://central.maven.org/maven2/org/apache/neethi/neethi/3.0.2/neethi-3.0.2.jar" dest="WEB-INF/lib/neethi-3.0.2.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/org/apache/ws/xmlschema/xmlschema-core/2.0.3/xmlschema-core-2.0.3.jar" dest="WEB-INF/lib/xmlschema-core-2.0.3.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/org/apache/cxf/cxf-rt-frontend-jaxws/2.6.1/cxf-rt-frontend-jaxws-2.6.1.jar" dest="WEB-INF/lib/cxf-rt-frontend-jaxws-2.6.1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/xmlbeans-2.5.0.jar" dest="WEB-INF/lib/xmlbeans-2.5.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/xmlbeans-2.5.0.jar" dest="WEB-INF/lib/xmlbeans-2.5.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/aopalliance/aopalliance/1.0/aopalliance-1.0.jar" dest="WEB-INF/lib/aopalliance-1.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/idempiere-xmlbeans-1.0.jar" dest="WEB-INF/lib/idempiere-xmlbeans-1.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/idempiere-xmlbeans-1.0.jar" dest="WEB-INF/lib/idempiere-xmlbeans-1.0.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/org/apache/axis/axis/1.4/axis-1.4.jar" dest="WEB-INF/lib/axis.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/commons-discovery/commons-discovery/0.5/commons-discovery-0.5.jar" dest="WEB-INF/lib/commons-discovery-0.5.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/javax/ws/rs/jsr311-api/1.1/jsr311-api-1.1.jar" dest="WEB-INF/lib/jsr311-api-1.1.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
<get src="http://mavensync.zkoss.org/maven2/org/zkoss/calendar/calendar/2.1.5/calendar-2.1.5.jar" dest="lib/calendar.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/commons-fileupload/commons-fileupload/1.2.2/commons-fileupload-1.2.2.jar" dest="lib/commons-fileupload.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://central.maven.org/maven2/commons-io/commons-io/2.1/commons-io-2.1.jar" dest="lib/commons-io.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="https://bitbucket.org/idempiere/idempiere-experimental/downloads/junit.jar" dest="lib/junit.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
<get src="http://downloads.sourceforge.net/project/idempiere/binary.file/jarfile/3.1/junit.jar" dest="lib/junit.jar" usetimestamp="true" verbose="true" retries="5" />
|
||||
</target>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue