Jump to content
We've recently updated our Privacy Statement, available here ×

How to remove loading window from Jasper Server


prabuddha.kulatunga
Go to solution Solved by prabuddha.kulatunga,

Recommended Posts

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • Solution

On loading.jsp file in the Jasper Server installation directory comment below part
  

<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>[/code]

When you do like above example, loading window will be disappear from everywhere.

To remove loading for a specific report,

put two div tags with id attribute. then hide the div using js code.

Below I shown the example;

<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>[/code]

Then add below javascript code;

<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>[/code]

In my case, I use a report as my dashboard and I refresh it in every 1 minute.So I want to remove loading window for my dashboard report only.

On js code, url is current url from the browser. dash is the my dashboard report url.

Link to comment
Share on other sites

  • 1 month later...

Dear Prabuddha.kulatunga,

I have tried as suggested by you.But its not working and also on login page it is disbaling the login button click.Commented the section as suggested please find it below.

<%--  ~ Copyright © 2005 - 2018 TIBCO Software Inc.  ~ http://www.jaspersoft.com.  ~  ~ This program is free software: you can redistribute it and/or modify  ~ it under the terms of the GNU Affero General Public License as published by  ~ the Free Software Foundation, either version 3 of the License, or  ~ (at your option) any later version.  ~  ~ This program is distributed in the hope that it will be useful,  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  ~ GNU Affero General Public License for more details.  ~  ~ You should have received a copy of the GNU Affero General Public License  ~ along with this program.  If not, see <https://www.gnu.org/licenses/>.  --%><%--Overview:    Standard Confirm. Provide user an opportunity to cancel an irrevocable action.Usage:    <t:insertTemplate template="/WEB-INF/jsp/templates/loading.jsp">        <t:putAttribute name="containerClass" value="cancellable">    </t:insertTemplate>        Use cancellable option only when load can be cancelled.--%><%@ taglib prefix="t" uri="http://tiles.apache.org/tags-tiles" %><%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%><%@ page import="com.jaspersoft.jasperserver.api.JSException" %><t:useAttribute id="containerClass" name="containerClass" classname="java.lang.String" ignore="true"/><t:useAttribute id="containerID" name="containerID" classname="java.lang.String" ignore="true"/><!--<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" aria-label="<spring:message code="button.cancel"/> "><span class="wrap"><spring:message code="button.cancel"/></span><span class="icon"></span></button>    </t:putAttribute>   </t:insertTemplate>-->[/code]
Link to comment
Share on other sites

  • 1 year later...

Thanks fo the help , prabuddha.kulatunga

For JS 7.5 i could not find the code you highlighted to be comment out however doing so on the one below helped


<tx:useAttribute id="containerClass" name="containerClass" classname="java.lang.String" ignore="true"/>
<tx:useAttribute id="containerID" name="containerID" classname="java.lang.String" ignore="true"/>

<div id="loading" class="jr-mDialog  jr-mDialogModal jr dialog loading movable centered_horz centered_vert ${containerClass}" style="position: absolute;">
    <div class="jr-mDialog-header jr mover">
        <h1 class="jr-mDialog-header-title jr"><spring:message code='jsp.loading'/></h1>
    </div>

    <div class="jr-mDialog-body jr-mDialog-bodyPadded jr">
        <div class="jr-mOverlay jr-mOverlayClear jr">
            <div class="jr-mSpinner jr-mSpinnerPlain jr"></div>
        </div>
    </div>

    <div class="jr-mDialog-footer jr">
         <button id="cancel" class="jr-mButton jr-mButtonText jr-mButtonPrimary jr-uWidth-100pc jr" aria-label="<spring:message code="button.cancel"/> ">
            <span class="jr-mButton-label jr"><spring:message code="button.cancel"/></span>
        </button>
    </div>
</div>

 

Link to comment
Share on other sites

  • 4 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...