IDEMPIERE-5920 Scrollbar in reports (#2109)
* IDEMPIERE-5920 Scrollbar in reports * IDEMPIERE-5920 Scrollbar in reports - implement alternative solution using details element
This commit is contained in:
parent
bcbfcbfeb9
commit
a8844694bc
|
@ -861,14 +861,12 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
String paraWrapId = null;
|
||||
if (parameterTable != null) {
|
||||
paraWrapId = cssPrefix + "-para-table-wrap";
|
||||
w.print("<div id='" + paraWrapId + "'>");
|
||||
w.print("<details id='" + paraWrapId + "' open=true style='cursor:pointer'>");
|
||||
w.print("<summary style='cursor:pointer'>"+Msg.getMsg(getCtx(), "Parameter")+"</summary>");
|
||||
w.print(compress(parameterTable.toString(), minify));
|
||||
|
||||
tr tr = new tr();
|
||||
tr.setClass("tr-parameter");
|
||||
th th = new th();
|
||||
tr.addElement(th);
|
||||
th.addElement(Msg.getMsg(getCtx(), "Parameter") + ":");
|
||||
|
||||
MQuery query = m_query;
|
||||
if (m_query.getReportProcessQuery() != null)
|
||||
|
@ -878,9 +876,6 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
if (r > 0) {
|
||||
tr = new tr();
|
||||
tr.setClass("tr-parameter");
|
||||
td td = new td();
|
||||
tr.addElement(td);
|
||||
td.addElement(" ");
|
||||
}
|
||||
|
||||
td td = new td();
|
||||
|
@ -899,15 +894,16 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount)
|
|||
}
|
||||
|
||||
w.print("</table>");
|
||||
w.print("</div>");
|
||||
w.print("</details>");
|
||||
}
|
||||
|
||||
StringBuilder tableWrapDiv = new StringBuilder();
|
||||
tableWrapDiv.append("<div class='").append(cssPrefix).append("-table-wrap' ");
|
||||
if (paraWrapId != null) {
|
||||
tableWrapDiv.append("onscroll=\"if (this.scrollTop > 0) document.getElementById('")
|
||||
.append(paraWrapId).append("').style.display='none'; ")
|
||||
.append("else document.getElementById('").append(paraWrapId).append("').style.display='block';\"");
|
||||
String paraWrapGet = "document.getElementById(\""+paraWrapId+"\")";
|
||||
tableWrapDiv.append("onscroll='setTimeout(() => {if (this.scrollTop > 0) ")
|
||||
.append(" if(").append(paraWrapGet).append(".open) ")
|
||||
.append(paraWrapGet).append(".open=false;}, 100)'");
|
||||
}
|
||||
tableWrapDiv.append(" >");
|
||||
|
||||
|
|
Loading…
Reference in New Issue