[General] Mobile Terminal Custom Widget Style

  • Last update:December 14, 2021
  • I. Overview

    1. Version

    Report server versionApp VersionHTML5 Mobile display pluginNew features
    10.010.4.76V10.4.76Customize the style of the mobile widget

    2. Application scenarios

    When users encounter the following scenarios, they need to adjust the widget style:

    • The heights of the wedgets in the template are different. For the aesthetics of the template, the heights of the wedgets need to be consistent.

    • Some wedgets do not need to set the wedgets border, such as radio button group wedgets.

    • In a non-light-colored background, the background color of the wedgets is not consistent with the background where it is located.

    • The font color of the wedgets does not match the overall effect of the template.


    3 Function introduction

    Users can customize the background color, border line type, border color, font size and other properties of the widget in theStyle Template of the widget.

    II. Example 1: Set the widget style template

    1. Effective range

    Report TypeWidget LocationFunction Description
    Dashboard
    Parameter PaneOnly supports setting the font size
    bodyWidget background, border line style, widget font, etc. are all supported

    Note: Only the JAR package version after 2020-06-08 can achieve the effect


    2. Template preparation

    1) ClickTemplate>New Dashboard in FineReport Designer.

    2) Drag in theDrop-down Box widget in the dashboard, and set the data dictionary in theAttributesTab page. As shown below:

    1.png


    3. Set the widget style

    Select theDrop-down Box widget, clickMobile Terminal> Style Template, selectCustom for the attribute setting, and set the widget attribute. As shown below:

    2.png


    4. Effect view

    The preview effect of App and HTML5 is shown in the figure below:

    3.gif

    Template download: 

    [General]_Mobile_custom_widget_style1.frm

    III. Example 2: Use JS statement to change the color of the widget value

    Note: When modifying the color of the widget value, the attributes of the JavaScript statement is greater than the setting in the widget "style Template".

    1. Template preparation

    1) ClickFile>New Dashboard  in FineReport Designer.

    2) Drag aText Fieldwidget into the dashboard, the widget value is123, as shown in the figure below:

    4.png


    2 Add after initialization event

    There are 3 types of JavaScript codes for modifying the color of the widget value, namely:

    • this.css("color","red"); 

    • this.css("color","#00ff00"); 

    • thia.css("color","rgb(0,0,255)"); 

    Select theText Fieldwidget, clickEvent, and addAfter Initialization event. As shown below:

    5.png

    JavaScript 代码如下所示:

    this.css('color','#33FF33')

    3. Effect view

    The preview effect of App and HTML5 is shown in the figure below:

    6.png

    Template download: 

    [General]_Mobile_custom_widget_style2.frm

    Attachment List


    Theme: Fine Mobile
    • 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