JS Hide Navigation Bar When Opening Reports

  • Last update:  2020-12-17
  • I. Overview

    1.1 Problem description

    Sometimes, there is too much information to be displayed in the report while the display interface is too small to fully display all the report content, so we may need to automatically hide the left navigation bar after opening the dashboard.

    The effect is shown in the figure below. Opening Wealth Management does not automatically hide the navigation bar while opening Smart City will automatically hide it.

    1606361980163202.gif


    1.2 Implementation ideas

    This can be achieved by adding an After Initialization event to the body of the dashboard.

    II. Example

    Take %FR_HOME%/webapps/webroot/WEB-INF/reportlets/demo/Dashboard/Smart City.frm  as an example.

    Select body and add the After Initialization event, as shown in the following figure:

    1606361980837200.png

    The JavaScript code is as follows:

    if ($('.bi-icon-change-button.unpin-font', window.parent.document).length > 0) {
    $('.bi-icon-change-button.unpin-font', window.parent.document).click();
    setTimeout(function() {
    $('.slider-popup-wrapper', window.parent.document).width(0);
    }, 100);
    }

    After saving the template, login the decision-making platform and mount the report to the directory for viewing.

    III. Completed Template

    Attachment List


    Theme: Secondary Development
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy