我想删除报告加载/刷新时出现的加载窗口。该怎么做呢?
谁能告诉我jasper服务器安装目录中的文件名,我至少应该更改它?
发布于 2018-08-10 19:11:39
关于Jasper服务器安装directory(tomcat\webapps\jasperserver\WEB-INF\jsp\templates\loading.jsp)注释部分中的loading.jsp文件
<t:insertTemplate template="/WEB-INF/jsp/templates/container.jsp">
<t:putAttribute name="containerID" value="${not empty containerID ? containerID : 'loading'}"/>
<t:putAttribute name="containerClass">panel dialog loading overlay moveable centered_horz centered_vert ${containerClass}</t:putAttribute>
<t:putAttribute name="containerTitle"><spring:message code='jsp.wait'/></t:putAttribute>
<t:putAttribute name="headerClass" value="mover"/>
<t:putAttribute name="bodyContent" >
<p class="message" role="alert" aria-live="assertive"><spring:message code='jsp.loading'/></p>
<button id="cancel" class="button action up"><span class="wrap"><spring:message code="button.cancel"/></span><span class="icon"></span></button>
</t:putAttribute>
</t:insertTemplate>
当你像上面的例子那样做的时候,加载窗口将会从任何地方消失。
要删除特定报表的加载,请执行以下操作:
放置两个带有id属性的div标签。然后使用js代码隐藏div。
下面的我给出了一个例子:
<div id="prabu">
<div id="x3">
<t:insertTemplate template="/WEB-INF/jsp/templates/container.jsp">
<t:putAttribute name="containerID" value="${not empty containerID ? containerID : 'loading'}"/>
<t:putAttribute name="containerClass">panel dialog loading overlay moveable centered_horz centered_vert ${containerClass}</t:putAttribute>
<t:putAttribute name="containerTitle"><spring:message code='jsp.wait'/></t:putAttribute>
<t:putAttribute name="headerClass" value="mover"/>
<t:putAttribute name="bodyContent" >
<p class="message" role="alert" aria-live="assertive"><spring:message code='jsp.loading'/></p>
<button id="cancel" class="button action up"><span class="wrap"><spring:message code="button.cancel"/></span><span class="icon"></span></button>
</t:putAttribute>
</t:insertTemplate>
</div>
</div>
然后添加以下javascript代码;
<script>
var url = window.location.href; //take current tab url
var dash = 'http://localhost:8080/jasperserver/flow.html?_flowId=viewReportFlow&_flowId=viewReportFlow&ParentFolderUri=%2FMy_Reports&reportUnit=%2FMy_Reports%2FDashboard_Report_Original__2_&standAlone=true';
if(url === dash ){
removeElement("x3");
}
function removeElement(elementId) {
// Removes an element from the document
var element = document.getElementById(elementId);
element.parentNode.removeChild(element);
}
</script>
在我的例子中,我使用一个报告作为我的仪表板,并且我在每1个minute.So中刷新它,我只想删除我的仪表板报告的加载窗口。
在js代码中, url 是来自浏览器的当前url。dash是我的仪表板报告url。
https://stackoverflow.com/questions/51778939
复制相似问题