JS Customize the Height of Toolbar

  • Last update:December 28, 2020
  • I. Description

    Sometimes we want to customize the height of the toolbar, for example, modify it to 40px as shown below:

    2.png

    3.png

    II. Ideas

    You can use JavaScript in Loading End event to control the height of the toolbar in the page.

    III. Operation steps

    Modify the height of the toolbar for the corresponding preview mode. For example, to modify the height of the toolbar under the Data Entry Preview, click Template > Web Attributes > Data Entry Settings, choose Individually set for the template, and then add the Loading End event, as shown in the figure below:

    1.png

    JS is as follows:

    //x-toolbar is the div class style where the toolbar is located
    $(".x-toolbar").css({
    "height":"40px",
          "background-size":"100% 110%",
          "border-bottom":"solid 1px #d0d0d0",
          "border-top":"solid 1px #d0d0d0"
        })
    $(".x-toolbar table").attr("style","height:40px")
    //Reset the toolbar height when the window changes size
    $(window).resize(function() {
    $(".x-toolbar").css({
    "height":"40px",
          "background-size":"100% 110%",
          "border-bottom":"solid 1px #d0d0d0",
          "border-top":"solid 1px #d0d0d0"
        })
    });

    IV. Preview the effect

    Save the template, choose Data Entry Preview, and the effect is as shown at the beginning.

    Note: Mobile terminal does not support this effect.

    V. Completed Template

    Attachment List


    Theme: Report Application
    • 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