CSS Change Title Background Color of a Dialogue Box

  • Last update:December 16, 2020
  • I. Overview

    1.1 Requirement

    In previewing a template using FineReport, the background color of the title bar of a hyperlink dialogue box defaults to blue.

    If the background color in blue does not match the overall system color, you may want to change the background color. Here are some steps you may follow, as shown in the figure below:

     


    1.2 Solution

    Set CSS style to change background color of the title bar of a dialogue box.

    II. Sample

    2.1 Create a CSS file

    1) Create a new CSS file and name it “test.css”. Input the following CSS codes:

    .fr-core-window-header{background:#466377 !important;}

    2)Copy test.css to the directory under %FR_HOME%\webapps\webroot\help\css.

     

    2.2 Configure report settings

    Settings for common reports and dashboards are different. 

    2.2.1 Common report

    Click [Template]>[Web Attributes] >[Reference CSS]. Select the file “test.css” and click [Add], as shown in the figure below:

     

    2.2.2 Dashboard

    In the right-hand pane, select body and create an After Initialization event. In the pop-up window, input JavaScript codes. Take the steps as shown in the figure below:

     

    Input the following JavaScript codes:

    var link = '<link rel="stylesheet" type="text/css" href="' + FR.server + '/help/css/test.css">';$("head").append(link);

    Note

    Type the absolute path of the CSS file after href. 


    2.3 Preview

    2.3.1 Common report

    Save the template and click [Preview]. The preview effect is shown as below:

     

    2.3.2 Dashboard

    Save the template and click [Preview]. The preview effect is shown as below:

     

    III. Download the templates

    Attachment List


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

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

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

    不再提示

    9s后關閉

    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