JS Toolbar center/right aligned

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

    1.1 Problem

    In actual projects, sometimes customers will require the toolbar buttons to be displayed in the center or on the right.


    1.2 Solution

    We only need to use JS to adjust the CSS style of the toolbar on the "start loading" event in the template Web attributes.

    II. Example

    2.1 Example 1: toolbar button is displayed in the center

    1) Open the report

    Open %FR_HOME%/webapps/webroot/WEB-INF/reportlets/GettingStartedEN .cpt

    2) Template design

    Click menu template>template web attributes>pagination preview settings , select "individually set for this template" to add a start loading event:

    image.png

    $('.x-toolbar').css('vertical-align','middle');
    $('table').css({'margin-left':'auto','margin-right':'auto'});

    3) Click pagination preview to see the effect:

    image (1).png


    2.2 Example 2: toolbar button is displayed on the right

    1) Open the report

    Open %FR_HOME%/webapps/webroot/WEB-INF/reportlets/GettingStartedEN .cpt

    2) Template design

    Click menu template>template web attributes>pagination preview settings , select "individually set for this template" to add a start loading event:

    $('.x-toolbar').css('vertical-align','middle');
    $('table').css({'float':'right'});

    3) Click pagination preview to see the effect:

    image (2).png


    2.3 Example 3: top and bottom toolbar button is displayed on the right

    1) Open the report

    Open %FR_HOME%/webapps/webroot/WEB-INF/reportlets/GettingStartedEN .cpt

    2) Template design

    Click menu template>template web attributes>pagination preview settings , select "individually set for this template" to add a start loading event:

    $('.x-toolbar').css('vertical-align','middle');
    $('table').css({'float':'right'});

    3) Click pagination preview to see the effect:

    image (3).png

    III. Download 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