首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何从Jasper服务器删除加载窗口

如何从Jasper服务器删除加载窗口
EN

Stack Overflow用户
提问于 2018-08-10 12:21:50
回答 1查看 88关注 0票数 2

我想删除报告加载/刷新时出现的加载窗口。该怎么做呢?

谁能告诉我jasper服务器安装目录中的文件名,我至少应该更改它?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-08-10 19:11:39

关于Jasper服务器安装directory(tomcat\webapps\jasperserver\WEB-INF\jsp\templates\loading.jsp)注释部分中的loading.jsp文件

代码语言:javascript
复制
<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。

下面的我给出了一个例子:

代码语言:javascript
复制
<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代码;

代码语言: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。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51778939

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档