JS Highlight selected sheet

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

    1.1 Problem

    When we have a report of multiple sheets, the selected sheet label is not obvious.

    image.png


    1.2 Solution

    We can highlight selected sheet by adding a template event.

    image (1).png

    Note: This does not support mobile devices.

    II. Example

    2.1 Sheet displayed at the bottom

    Add a data entry template loading end event with the following JS:

    image (2).png

    $('.fr-sheetbutton-container-active .fr-sheetbutton-middlepart').css('color', 'red');  //Change the color of the selected sheet to be red
    $('.fr-sheetbutton-container').bind('click', function() {  
        $('.fr-sheetbutton-container-active .fr-sheetbutton-middlepart').css('color', 'red');  //Get sheet switching event
        $('.fr-sheetbutton-container:not(.fr-sheetbutton-container-active) .fr-sheetbutton-middlepart').css('color', 'black'); //Keep other text black
    });


    2.2 Sheet displayed at the top

    Add a data entry template loading end event with the following JS:

    image (3).png

    $('.fr-sheetbutton-container-active .fr-sheetbutton-middlepart-top').css('color', 'red');  
    $('.fr-sheetbutton-container').bind('click', function() {  
        $('.fr-sheetbutton-container-active .fr-sheetbutton-middlepart-top').css('color', 'red');  
        $('.fr-sheetbutton-container:not(.fr-sheetbutton-container-active) .fr-sheetbutton-middlepart-top').css('color', 'black');  
    });

    Save and data entry preview to see the effect:

    image (1).png

    III. Download template

    Attachment List


    Theme: Data Entry
    • 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